Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "10.*-rc*"
}
}
15 changes: 15 additions & 0 deletions docs/overview/responses/developer_quickstart.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// SAMPLE: Generate text from a simple prompt through Responses API
// PAGE: https://platform.openai.com/docs/overview
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#pragma warning disable OPENAI001

#:package OpenAI@2.*
#:property PublishAot=false

using OpenAI.Responses;

string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!;
OpenAIResponseClient client = new(model: "gpt-5", apiKey: key);
OpenAIResponse response = client.CreateResponse("Write a short bedtime story about a unicorn.");

Console.WriteLine(response.GetOutputText());