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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Universal.Operative.Sdk.Codex.OpenAI.ChatGpt" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Universal.Operative.Sdk.Codex.OpenAI.ChatGpt" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Universal.Operative.Sdk.Codex.OpenAI.ChatGpt" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Universal.Operative.Sdk.Codex.OpenAI.ChatGpt --version 1.0.0
                    
#r "nuget: Universal.Operative.Sdk.Codex.OpenAI.ChatGpt, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Universal.Operative.Sdk.Codex.OpenAI.ChatGpt@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Universal.Operative.Sdk.Codex.OpenAI.ChatGpt&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Universal.Operative.Sdk.Codex.OpenAI.ChatGpt&version=1.0.0
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.