From 76e9b1260193d9c00f727878e74bca238d3eebe2 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 30 Jun 2026 16:02:46 +0000 Subject: [PATCH] Add OpenAI gpt-image-2 image model to TEE_LLM enum Adds GPT_IMAGE_2 ("openai/gpt-image-2") to the TEE_LLM enum so the SDK can route to OpenAI's image-generation model already supported by the tee-gateway. Billed at a flat per-image rate; images returned as data: URIs on the response. Updates the image-generation example and README model list. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01BUq85aJiPfVTWsMCPmWJ1L --- README.md | 1 + examples/llm_image_generation.py | 2 ++ src/opengradient/types.py | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/README.md b/README.md index b2cb089..8cda3e4 100644 --- a/README.md +++ b/README.md @@ -250,6 +250,7 @@ The SDK provides access to models from multiple providers via the `og.TEE_LLM` e - GPT-5 - GPT-5 Mini - GPT-5.2 +- GPT Image 2 (native image generation) #### Anthropic - Claude Sonnet 4.5 diff --git a/examples/llm_image_generation.py b/examples/llm_image_generation.py index 68fb378..eeafc34 100644 --- a/examples/llm_image_generation.py +++ b/examples/llm_image_generation.py @@ -34,6 +34,8 @@ async def main(): # of the signed output hash. # # Available image generation models: + # OpenAI (flat per-image rate, $0.05/image): + # og.TEE_LLM.GPT_IMAGE_2 # Google (inline, billed per output token): # og.TEE_LLM.GEMINI_2_5_FLASH_IMAGE # og.TEE_LLM.GEMINI_3_1_FLASH_IMAGE diff --git a/src/opengradient/types.py b/src/opengradient/types.py index 66c6abe..3d87bdd 100644 --- a/src/opengradient/types.py +++ b/src/opengradient/types.py @@ -557,6 +557,12 @@ class TEE_LLM(str, Enum): GPT_5_4_NANO = "openai/gpt-5.4-nano" GPT_5_5 = "openai/gpt-5.5" + # OpenAI image-generation model via TEE (dedicated /images/generations + # endpoint). Billed at a flat rate per image. Images are returned on + # ``TextGenerationOutput.images`` and ``StreamChunk.images`` as data: URIs + # and are not part of the signed output hash. + GPT_IMAGE_2 = "openai/gpt-image-2" + # Anthropic models via TEE CLAUDE_SONNET_4_5 = "anthropic/claude-sonnet-4-5" CLAUDE_SONNET_4_6 = "anthropic/claude-sonnet-4-6"