--- url: "https://platform.openai.com/docs" titulek: "OpenAI API Platform Documentation" h1: "API Platform" popis: "Explore guides, API docs, and examples for the OpenAI API." jazyk: "en" kanonicka: "https://developers.openai.com/api/docs" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 03:52:38" znaku: 4994 slov: 577 kodovani: "utf-8" sha256: "7f314b9214089c430e2a224ee08f7bbbe7b6dfa083eb2b2dced9631c08bbccb6" --- API PlatformDeveloper quickstartMake your first API request in minutes. Learn the basics of the OpenAI platform.[Get started](/api/docs/quickstart)[Create API key](https://platform.openai.com/api-keys)`1 2 3 4 5 6 7curl https://api.openai.com/v1/responses \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -d '{ "model": "gpt-6-astra", "input": "Write a short bedtime story about a unicorn." }'``1 2 3 4 5 6 7 8 9import OpenAI from "openai"; const client = new OpenAI(); const response = await client.responses.create({ model: "gpt-6-astra", input: "Write a short bedtime story about a unicorn.", }); console.log(response.output_text);``1 2 3 4 5 6 7from openai import OpenAI client = OpenAI() response = client.responses.create(model="gpt-6-astra", input="Write a short bedtime story about a unicorn.") print(response.output_text)``1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25package main import ( "context" "fmt" "github.com/openai/openai-go/v3" "github.com/openai/openai-go/v3/responses" ) func main() { client := openai.NewClient() response, err := client.Responses.New(context.Background(), responses.ResponseNewParams{ Model: "gpt-6-astra", Input: responses.ResponseNewParamsInputUnion{ OfString: openai.String("Write a short bedtime story about a unicorn."), }, }) if err != nil { panic(err) } fmt.Println(response.OutputText()) }``1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20import com.openai.client.OpenAIClient; import com.openai.client.okhttp.OpenAIOkHttpClient; import com.openai.models.responses.Response; import com.openai.models.responses.ResponseCreateParams; public class PlatformOverviewExample { public static void main(String[] args) { OpenAIClient client = OpenAIOkHttpClient.fromEnv(); ResponseCreateParams params = ResponseCreateParams.builder().model("gpt-6-astra").input("Write a short bedtime story about a unicorn.").build(); Response response = client.responses().create(params); response.output().stream() .flatMap(item -> item.message().stream()) .flatMap(message -> message.content().stream()) .flatMap(content -> content.outputText().stream()) .forEach(outputText -> System.out.println(outputText.text())); } }``1 2 3 4 5 6 7 8 9 10 11 12using OpenAI.Responses; #pragma warning disable OPENAI001 string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!; ResponsesClient client = new(key); ResponseResult response = await client.CreateResponseAsync( "gpt-6-astra", "Write a short bedtime story about a unicorn." ); Console.WriteLine(response.GetOutputText());``1 2 3 4 5 6 7 8 9 10require "openai" openai = OpenAI::Client.new response = openai.responses.create( model: "gpt-6-astra", input: "Write a short bedtime story about a unicorn." ) puts(response.output_text)``1 2 3 4 5openai responses create \ --model gpt-6-astra \ --input "Write a short bedtime story about a unicorn." \ --raw-output \ --transform 'output.#(type=="message").content.0.text'`Build paths[Responses APIMake direct model requests for text, structured output, tools, and multimodal workflows.Start with Responses](/api/docs/guides/text)[Agents SDKBuild code-first agents that orchestrate tools, handoffs, approvals, tracing, and container-based execution.Start with the Agents SDK](/api/docs/guides/agents/quickstart)ModelsCompare model capabilities and specifications.[View all](/api/docs/models)[AstraGPT-6 AstraOur most capable model, built for the hardest end-to-end work](/api/docs/models/gpt-6-astra)[GPT-5.6 SolFlagship model for complex professional work](/api/docs/models/gpt-5.6-sol)[GPT-5.6 TerraGPT-5.6 model that balances intelligence and cost](/api/docs/models/gpt-5.6-terra)[GPT-5.6 LunaGPT-5.6 model optimized for cost-sensitive workloads](/api/docs/models/gpt-5.6-luna)Start building[Read and generate textUse the API to prompt a model and generate text](/api/docs/guides/text)[Use a model's vision capabilitiesAllow models to see and analyze images in your application](/api/docs/guides/images-vision)[Generate images as outputCreate images with GPT Image 2](/api/docs/guides/image-generation)[Build apps with audioAnalyze, transcribe, and generate audio with API endpoints](/api/docs/guides/audio)[Build agentic applicationsUse the API to build agents that use tools and computers](/api/docs/guides/agents)[Achieve complex tasks with reasoningUse reasoning models to carry out complex tasks](/api/docs/guides/reasoning)[Get structured data from modelsUse Structured Outputs to get model responses that adhere to a JSON schema](/api/docs/guides/structured-outputs)[Tailor to your use caseAdjust our models to perform specifically for your use case with fine-tuning, evals, and distillation](/api/docs/guides/model-optimization)[Help centerFrequently asked account and billing questions](https://help.openai.com)[Developer forumDiscuss topics with other developers](https://community.openai.com/)[CookbookOpen-source collection of examples and guides](/cookbook)[StatusCheck the status of OpenAI services](https://status.openai.com)