Universal.Operative.Sdk.Codex.OpenAI.ChatGpt
1.0.0
dotnet add package Universal.Operative.Sdk.Codex.OpenAI.ChatGpt --version 1.0.0
NuGet\Install-Package Universal.Operative.Sdk.Codex.OpenAI.ChatGpt -Version 1.0.0
<PackageReference Include="Universal.Operative.Sdk.Codex.OpenAI.ChatGpt" Version="1.0.0" />
<PackageVersion Include="Universal.Operative.Sdk.Codex.OpenAI.ChatGpt" Version="1.0.0" />
<PackageReference Include="Universal.Operative.Sdk.Codex.OpenAI.ChatGpt" />
paket add Universal.Operative.Sdk.Codex.OpenAI.ChatGpt --version 1.0.0
#r "nuget: Universal.Operative.Sdk.Codex.OpenAI.ChatGpt, 1.0.0"
#:package Universal.Operative.Sdk.Codex.OpenAI.ChatGpt@1.0.0
#addin nuget:?package=Universal.Operative.Sdk.Codex.OpenAI.ChatGpt&version=1.0.0
#tool nuget:?package=Universal.Operative.Sdk.Codex.OpenAI.ChatGpt&version=1.0.0
Universal.Operative.Sdk.Codex.OpenAI.ChatGpt
Image generation through the existing Codex ChatGPT Responses transport.
using Universal.OpenAI.ChatGpt.Client;
using Universal.OpenAI.ChatGpt.Client.Responses;
using Universal.Operative.Sdk.Codex.Tools;
using var http = new HttpClient { Timeout = TimeSpan.FromMinutes(5) };
using var credentials = new AuthenticationFileCredentialProvider(authFilePath, http);
using var client = new ChatGptResponsesClient(http, credentials);
var images = new Universal.Operative.Sdk.Codex.OpenAI.ChatGpt.ImageGenerationBackend(client,
new() { ModelId = "gpt-6.1-sol", ImageModel = "gpt-image-2", ArtifactDirectory = "generated-images" });
await using var tools = CodexToolSet.Create(new() { ImageGeneration = images });
The caller owns the client and credentials. Existing token refresh is reused.
Local files, base64 images, and HTTPS references are supported; hosted file IDs
are rejected. Requests force image generation with store:false and streaming.
Completed image items are collected from response.output_item.done, since the
terminal response can omit their image payloads. Failed or truncated streams do
not return success. Optional artifacts use unique filenames.
This targets https://chatgpt.com/backend-api/codex/responses, the existing
client's endpoint. It is distinct from public Sign in with ChatGPT plan usage:
that public route currently documents image generation as unsupported. The Codex
route was live-tested with the signed-in account on 3 October 2026; availability
can differ by account and backend changes. No automatic fallback to paid API-key
requests occurs.
Live validation generated an RGB PNG and edited it to an RGBA PNG with transparent pixels. The backend returned 1254x1254 images despite a requested 1024x1024 size; consumers should inspect returned artifacts rather than assume requested dimensions. See the public route limitations and Codex image generation documentation.
V8 use:
const result = await tools.image_gen__imagegen({ prompt: "Draw a blue circle" });
generatedImage(result);
References selected with num_last_images_to_include must still be present in
the current conversation; older images removed by compaction are not recovered
automatically. Configure artifact storage and use paths for durable references.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Universal.OpenAI.ChatGpt.Client (>= 1.0.6)
- Universal.Operative.Sdk.Codex.OpenAI (>= 1.0.0)
-
net8.0
- Universal.OpenAI.ChatGpt.Client (>= 1.0.6)
- Universal.Operative.Sdk.Codex.OpenAI (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 101 | 10/3/2026 |
Initial release.