flâneur — a map of the web's best reading

Text generation - OpenAI API

platform.openai.com · 1,777 words · saved by 1 readers

OpenAI's text generation models (often called generative pre-trained transformers or large language models) have been trained to understand natural language, code, and images. The models provide text outputs in response to their inputs. The inputs to these models are also referred to as "prompts". Designing a prompt is essentially how you “program” a large language model model, usually by providing instructions or some examples of how to successfully complete a task. Using OpenAI's text generation models, you can build applications to: With the release of gpt-4-vision-preview, you can now build systems that also process and understand images. To use one of these models via the OpenAI API, you’ll send a request containing the inputs and your API key, and receive a response containing the model’s output. Our latest models, gpt-4 and gpt-3.5-turbo, are accessed through the chat completions API endpoint. You can experiment with various models in the chat playground. If you’re not sure whic

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. Use the Responses API for direct model requests like this text-generation call. Generate text from a simple prompt javascript 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.6" , input : "Write a one-sentence bedtime story about a unicorn." , }); console .log

Explore this link on the map →

related reading