Prompt engineering / OpenAI Platform
platform.openai.com·16h
💬Prompt Engineering
Preview
Report Post

Enhance results with prompt engineering strategies.

With the OpenAI API, you can use a large language model to generate text from a prompt, as you might using ChatGPT. Models can generate almost any kind of text response—like code, mathematical equations, structured JSON data, or human-like prose.

Here’s a simple example using the Responses API.

1
2
3
4
5
6
7
8
9
import OpenAI from "openai";
const client = new OpenAI();

const response = await client.responses.create({
model: "gpt-5.2",
input: "Write a one-sentence bedtime story about a unicorn."
});

console.log(response.output_text);

An array of content generated by the model is in the output pr…

Similar Posts

Loading similar posts...