Text generation - OpenAI API
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
- Prompt engineering | OpenAI APIplatform.openai.com
- GitHub - brexhq/prompt-engineering: Tips and tricks for working with Large Language Models like OpenAI's GPT-4. · GitHubgithub.com
- The Shape of AI | UX Patterns for Artificial Intelligence Designshapeof.ai
- GitHub - x1xhlol/system-prompts-and-models-of-ai-tools: FULL Augment Code, Claude Code, Cluely, CodeBuddy, Comet, Cursor, Devin AI, Junie, Kiro, Leap.new, Lovable, Manus, NotionAI, Orchids.app, Perplexity, Poke, Qoder, Replit, Same.dev, Tragithub.com
- Prompt generation | OpenAI APIplatform.openai.com
- Cookbookcookbook.openai.com
- Replicate - Run AI with an APIreplicate.com
- GitHub - affaan-m/ECC: The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond. · GitHubgithub.com
- GitHub - google-gemini/cookbook: Examples and guides for using the Gemini API · GitHubgithub.com
- GitHub - f/prompts.chat: f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy. · GitHubgithub.com
- Rewind.ai - Every AI Tool, Completely Freerewind.ai
- OpenAI | Research & Deploymentopenai.com