Prompt Buddy logoPrompt Buddy

openai · OpenAI Platform Docs

Text generation

Teaches how to generate text using OpenAI models, including prompt engineering techniques, model selection strategies, message role implementation, and handling structured JSON outputs.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Text generation

Teaches how to generate text using OpenAI models, including prompt engineering techniques, model selection strategies, message role implementation, and handling structured JSON outputs.

When To Use

Use when you need to implement text generation, optimize prompt performance through engineering techniques, or select the appropriate model for specific reasoning or chat tasks.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/text-generation-workflow-guide.mdA guide covering prompt engineering, model selection, message roles, and reusable prompts for text generation using the OpenAI API.Questions about a guide covering prompt engineering, model selection, message roles, and reusable prompts for text generation using t...
examples/text-generation-openai-text-generation.jsonA JSON object representing a text generation response containing an assistant message and content output.Exact payloads, commands, or snippets shown in A JSON object representing a text generation response containing an assistant message and content output.
examples/text-generation-openai-text-generation-javascript-client-request.javascriptA JavaScript code example demonstrating how to use the OpenAI client to create a text generation response with reasoning parameters.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the OpenAI client to create a text generation response with reason...
examples/text-generation-openai-text-generation-python-client.pythonA Python script demonstrating how to use the OpenAI client to generate text using the responses.create method with reasoning parameters.Exact payloads, commands, or snippets shown in A Python script demonstrating how to use the OpenAI client to generate text using the responses.create method with re...
examples/text-generation-openai-text-generation-curl-request.bashA bash curl command demonstrating a text generation API request to the OpenAI platform using a specified model and reasoning effort.Exact payloads, commands, or snippets shown in A bash curl command demonstrating a text generation API request to the OpenAI platform using a specified model and re...
examples/text-generation-openai-text-generation-javascript-quickstart.javascriptA JavaScript code example demonstrating how to use the OpenAI client to create a text generation response with reasoning effort settings.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the OpenAI client to create a text generation response with reason...
examples/text-generation-openai-text-generation-python-client-2.pythonA Python script demonstrating how to use the OpenAI client to generate text using the responses.create method with reasoning parameters.Exact payloads, commands, or snippets shown in A Python script demonstrating how to use the OpenAI client to generate text using the responses.create method with re...
examples/text-generation-openai-text-generation-curl-request-2.bashA bash curl command demonstrating a text generation API request to the OpenAI platform using a specified model and reasoning effort.Exact payloads, commands, or snippets shown in A bash curl command demonstrating a text generation API request to the OpenAI platform using a specified model and re...
examples/text-generation-openai-text-generation-javascript-quickstart-2.javascriptA JavaScript code example demonstrating how to use the OpenAI client to create a text generation response using a prompt ID and variables.Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use the OpenAI client to create a text generation response using a pro...
examples/text-generation-openai-text-generation-python-client-3.pythonA Python script demonstrating how to use the OpenAI client to generate text using a specific model and prompt variables.Exact payloads, commands, or snippets shown in A Python script demonstrating how to use the OpenAI client to generate text using a specific model and prompt variables.
examples/text-generation-openai-text-generation-curl-request-3.bashA bash curl command demonstrating a text generation API request to the OpenAI platform using a model and prompt variables.Exact payloads, commands, or snippets shown in A bash curl command demonstrating a text generation API request to the OpenAI platform using a model and prompt varia...
examples/text-generation-openai-text-generation-javascript-upload-prompt-variable.javascriptA JavaScript example demonstrating how to upload a PDF file and reference it as a variable within a text generation prompt using the OpenAI client.Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to upload a PDF file and reference it as a variable within a text generation p...
examples/text-generation-openai-text-generation-python-pdf-variable-input.pythonA Python script demonstrating how to upload a PDF and reference it as an input file variable within a text generation request using the OpenAI client.Exact payloads, commands, or snippets shown in A Python script demonstrating how to upload a PDF and reference it as an input file variable within a text generation...
examples/text-generation-openai-text-generation-bash-curl-request.bashA bash curl command demonstrating how to send a text generation request to the OpenAI API using a pre-uploaded file ID.Exact payloads, commands, or snippets shown in A bash curl command demonstrating how to send a text generation request to the OpenAI API using a pre-uploaded file ID.

What This Skill Covers

  • 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 te...
  • Main sections: Prompt engineering, Choosing models and APIs, Message roles and instruction following, Reusable prompts, Next steps.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.openai.com/api/docs/guides/text.md