Send a text prompt to an image-capable model and receive base64-encoded images inDocumentation Index
Fetch the complete documentation index at: https://docs.auriko.ai/llms.txt
Use this file to discover all available pages before exploring further.
choices[0].message.images.
Prerequisites
- An Auriko API key
- Python 3.10+ with the OpenAI SDK (
pip install openai) or the auriko SDK (pip install auriko)- OR Node.js 18+ with the OpenAI SDK (
npm install openai) or@auriko/sdk(npm install @auriko/sdk)
- OR Node.js 18+ with the OpenAI SDK (
- An image-capable model:
gemini-2.5-flash-image,gemini-3-pro-image-preview, orgemini-3.1-flash-image-preview
Generate images
Create a chat completion with an image-capable model and save the generated image:image_tokens in usage.completion_tokens_details reports tokens consumed by generated images. The images field is absent when no images are generated. In streaming responses, images arrive complete in a single delta chunk.
Response shape
Each entry in theimages array is a GeneratedImage object:
| Field | Type | Description |
|---|---|---|
type | string | Always "image" |
mime_type | string | MIME type (e.g., image/png) |
data | string | Base64-encoded image data |
thought_signature | string? | Opaque model signature. Response-only |
Related
- Vision — analyze images in chat completions
- Streaming — stream image responses chunk-by-chunk
- Extensions and thinking — pass provider-specific parameters