-
Notifications
You must be signed in to change notification settings - Fork 0
docs: add GPT Image 2.5 native references #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
model-api-reference/official-native-api/openai/gpt-image-2.5-flare.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| --- | ||
| title: GPT Image 2.5 Flare Native API Reference | ||
| description: Generate and edit images with GPT Image 2.5 Flare through SandBase's native OpenAI Images API. | ||
| aside: false | ||
| outline: false | ||
| apiReference: | ||
| title: GPT Image 2.5 Flare | ||
| operation: OpenAI Images | ||
| method: POST | ||
| path: /v1/images/generations | ||
| description: Generate images with the provider-compatible OpenAI Images API. This synchronous endpoint returns image data directly. | ||
| signature: client.images.generate(params) | ||
| groups: | ||
| - title: Request body | ||
| schema: ImageGenerateParams | ||
| description: Use the native OpenAI Images request shape. The model must be gpt-image-2.5-flare. | ||
| fields: | ||
| - { name: model, type: string, required: true, description: Use gpt-image-2.5-flare on this endpoint., default: gpt-image-2.5-flare } | ||
| - { name: prompt, type: string, required: true, description: Text description of the image to generate. } | ||
| - { name: n, type: integer, required: false, description: Number of images to generate when supported. } | ||
| - { name: size, type: string, required: false, description: Output dimensions supported by the model. } | ||
| - { name: quality, type: string, required: false, description: Output quality such as low, medium, high, or auto. } | ||
| - { name: background, type: string, required: false, description: Background setting such as transparent, opaque, or auto. } | ||
| - { name: output_format, type: string, required: false, description: Output encoding such as png, webp, or jpeg. } | ||
| - { name: output_compression, type: integer, required: false, description: Output compression level from 0 to 100. } | ||
| - { name: moderation, type: string, required: false, description: Provider-compatible moderation setting. } | ||
| - { name: user, type: string, required: false, description: Provider-compatible end-user identifier. } | ||
| examples: | ||
| - label: cURL | ||
| language: bash | ||
| code: |- | ||
| curl https://api.sandbase.ai/v1/images/generations \ | ||
| -H "Authorization: Bearer $SANDBASE_API_KEY" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{"model":"gpt-image-2.5-flare","prompt":"A paper-cut city floating above the clouds","size":"1024x1024"}' | ||
| - label: Python | ||
| language: python | ||
| code: |- | ||
| from openai import OpenAI | ||
|
|
||
| client = OpenAI(api_key="sk-...", base_url="https://api.sandbase.ai/v1") | ||
| result = client.images.generate( | ||
| model="gpt-image-2.5-flare", | ||
| prompt="A paper-cut city floating above the clouds", | ||
| size="1024x1024", | ||
| ) | ||
| print(result.data[0].b64_json or result.data[0].url) | ||
| response: | ||
| status: 200 OK | ||
| code: |- | ||
| { | ||
| "created": 1787529600, | ||
| "data": [{"b64_json": "iVBORw0KGgo..."}], | ||
| "usage": {"input_tokens": 12, "output_tokens": 4096, "total_tokens": 4108} | ||
| } | ||
| --- | ||
|
|
||
| <ApiReferencePage /> | ||
|
|
||
| ## Native protocol notes | ||
|
|
||
| GPT Image 2.5 Flare is optimized for fast, high-quality image generation and editing in everyday creative workflows. It uses the OpenAI Images API contract, not the general SandBase `/v1/run` model endpoint. Requests are synchronous and return image data in `data` as `b64_json` or a URL. | ||
|
|
||
| Use the shared [image generation reference](/api-reference/images/generations) for authentication, response details, limits, and error handling. The SandBase native catalog entries are `openai/gpt-image-2.5-flare-official` and `openai/gpt-image-2.5-flare-official/edit`; send the public model name `gpt-image-2.5-flare` in native requests. | ||
|
|
||
| ## Edit images | ||
|
|
||
| Send edits to `POST /v1/images/edits` as `multipart/form-data`. Provide `model`, `prompt`, and at least one `image` file. Repeat the `image` field to compose or edit multiple source images. | ||
|
|
||
| ```bash | ||
| curl https://api.sandbase.ai/v1/images/edits \ | ||
| -H "Authorization: Bearer $SANDBASE_API_KEY" \ | ||
| -F "model=gpt-image-2.5-flare" \ | ||
| -F "prompt=Turn this product photo into a warm editorial scene" \ | ||
| -F "image=@product.png" \ | ||
| -F "quality=high" | ||
| ``` | ||
|
|
||
| See the shared [image editing reference](/api-reference/images/edits) for the multipart request and response schema. To use the general asynchronous `/v1/run` contract instead, see [`openai/gpt-image-2.5-flare/edit`](https://www.sandbase.ai/model/openai/gpt-image-2.5-flare/edit). | ||
|
|
||
| ## Official OpenAI resources | ||
|
|
||
| - [Images API guide](https://platform.openai.com/docs/guides/images) | ||
| - [Images API reference](https://platform.openai.com/docs/api-reference/images) | ||
| - [OpenAI API quickstart](https://platform.openai.com/docs/quickstart) | ||
85 changes: 85 additions & 0 deletions
85
model-api-reference/official-native-api/openai/gpt-image-2.5-sunburst.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| --- | ||
| title: GPT Image 2.5 Sunburst Native API Reference | ||
| description: Generate and edit images with GPT Image 2.5 Sunburst through SandBase's native OpenAI Images API. | ||
| aside: false | ||
| outline: false | ||
| apiReference: | ||
| title: GPT Image 2.5 Sunburst | ||
| operation: OpenAI Images | ||
| method: POST | ||
| path: /v1/images/generations | ||
| description: Generate images with the provider-compatible OpenAI Images API. This synchronous endpoint returns image data directly. | ||
| signature: client.images.generate(params) | ||
| groups: | ||
| - title: Request body | ||
| schema: ImageGenerateParams | ||
| description: Use the native OpenAI Images request shape. The model must be gpt-image-2.5-sunburst. | ||
| fields: | ||
| - { name: model, type: string, required: true, description: Use gpt-image-2.5-sunburst on this endpoint., default: gpt-image-2.5-sunburst } | ||
| - { name: prompt, type: string, required: true, description: Text description of the image to generate. } | ||
| - { name: n, type: integer, required: false, description: Number of images to generate when supported. } | ||
| - { name: size, type: string, required: false, description: Output dimensions supported by the model. } | ||
| - { name: quality, type: string, required: false, description: Output quality such as low, medium, high, or auto. } | ||
| - { name: background, type: string, required: false, description: Background setting such as transparent, opaque, or auto. } | ||
| - { name: output_format, type: string, required: false, description: Output encoding such as png, webp, or jpeg. } | ||
| - { name: output_compression, type: integer, required: false, description: Output compression level from 0 to 100. } | ||
| - { name: moderation, type: string, required: false, description: Provider-compatible moderation setting. } | ||
| - { name: user, type: string, required: false, description: Provider-compatible end-user identifier. } | ||
| examples: | ||
| - label: cURL | ||
| language: bash | ||
| code: |- | ||
| curl https://api.sandbase.ai/v1/images/generations \ | ||
| -H "Authorization: Bearer $SANDBASE_API_KEY" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d '{"model":"gpt-image-2.5-sunburst","prompt":"A cinematic glass pavilion beside a black-sand beach","size":"1536x1024"}' | ||
| - label: Python | ||
| language: python | ||
| code: |- | ||
| from openai import OpenAI | ||
|
|
||
| client = OpenAI(api_key="sk-...", base_url="https://api.sandbase.ai/v1") | ||
| result = client.images.generate( | ||
| model="gpt-image-2.5-sunburst", | ||
| prompt="A cinematic glass pavilion beside a black-sand beach", | ||
| size="1536x1024", | ||
| ) | ||
| print(result.data[0].b64_json or result.data[0].url) | ||
| response: | ||
| status: 200 OK | ||
| code: |- | ||
| { | ||
| "created": 1787529600, | ||
| "data": [{"b64_json": "iVBORw0KGgo..."}], | ||
| "usage": {"input_tokens": 12, "output_tokens": 4096, "total_tokens": 4108} | ||
| } | ||
| --- | ||
|
|
||
| <ApiReferencePage /> | ||
|
|
||
| ## Native protocol notes | ||
|
|
||
| GPT Image 2.5 Sunburst prioritizes visual fidelity and precision for complex image generation and editing workflows. It uses the OpenAI Images API contract, not the general SandBase `/v1/run` model endpoint. Requests are synchronous and return image data in `data` as `b64_json` or a URL. | ||
|
|
||
| Use the shared [image generation reference](/api-reference/images/generations) for authentication, response details, limits, and error handling. The SandBase native catalog entries are `openai/gpt-image-2.5-sunburst-official` and `openai/gpt-image-2.5-sunburst-official/edit`; send the public model name `gpt-image-2.5-sunburst` in native requests. | ||
|
|
||
| ## Edit images | ||
|
|
||
| Send edits to `POST /v1/images/edits` as `multipart/form-data`. Provide `model`, `prompt`, and at least one `image` file. Repeat the `image` field to compose or edit multiple source images. | ||
|
|
||
| ```bash | ||
| curl https://api.sandbase.ai/v1/images/edits \ | ||
| -H "Authorization: Bearer $SANDBASE_API_KEY" \ | ||
| -F "model=gpt-image-2.5-sunburst" \ | ||
| -F "prompt=Preserve the subject and replace the background with a precise architectural studio" \ | ||
| -F "image=@portrait.png" \ | ||
| -F "quality=high" | ||
| ``` | ||
|
|
||
| See the shared [image editing reference](/api-reference/images/edits) for the multipart request and response schema. To use the general asynchronous `/v1/run` contract instead, see [`openai/gpt-image-2.5-sunburst/edit`](https://www.sandbase.ai/model/openai/gpt-image-2.5-sunburst/edit). | ||
|
|
||
| ## Official OpenAI resources | ||
|
|
||
| - [Images API guide](https://platform.openai.com/docs/guides/images) | ||
| - [Images API reference](https://platform.openai.com/docs/api-reference/images) | ||
| - [OpenAI API quickstart](https://platform.openai.com/docs/quickstart) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When readers follow this newly added link, the shared page is not rendered from
public/openapi.yaml;ApiReferencePage.vueresolves itsapiReferenceKeythrough.vitepress/theme/generatedApiReferenceSpecs.ts, whoseimages/generationsentry still saysUse gpt-image-2 on this endpoint, whileimages/editsstill omits the request fields and only demonstrates that older alias. Consequently, both new GPT Image 2.5 pages direct users to a reference that does not advertise—and for generation appears to contradict—the newly supported aliases. Update the generated image-reference entries alongside the OpenAPI schema.Useful? React with 👍 / 👎.