Gemini 3.1 Flash with native image generation capabilities. Can generate images directly in chat responses alongside text. Features separate pricing for text and image output tokens.
Copy usage instructions for Claude, ChatGPT, or other AI
| Token Type | Credits | USD Equivalent |
|---|---|---|
| Input Tokens | 500 | $0.50 |
| Output Tokens | 3,000 | $3.00 |
| ๐ผImage Output Tokens | 60,000 | $60.00 |
* 1 credit โ $0.001 (actual charges may vary based on usage)
curl -X POST "https://api.core.today/llm/gemini/v1beta/openai/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gemini-3.1-flash-image-preview",
"messages": [
{
"role": "user",
"content": "Explain the concept of neural style transfer in simple terms."
}
],
"max_tokens": 1000,
"temperature": 0.7
}'| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
messages | array | Yes | - | Array of message objects (OpenAI format) |
temperature | float | No | 1 | Sampling temperature (0-2) |
top_p | float | No | 0.95 | Nucleus sampling parameter |
max_tokens | integer | No | - | Maximum output tokens |
stream | boolean | No | false | Enable Server-Sent Events streaming |
Standard text conversation
curl -X POST "https://api.core.today/llm/gemini/v1beta/openai/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gemini-3.1-flash-image-preview",
"messages": [
{
"role": "user",
"content": "Explain the concept of neural style transfer in simple terms."
}
],
"max_tokens": 1000,
"temperature": 0.7
}'Generate an image through natural language conversation
curl -X POST "https://api.core.today/llm/gemini/v1beta/openai/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gemini-3.1-flash-image-preview",
"messages": [
{
"role": "user",
"content": "Generate an image of a serene Japanese garden with a koi pond, cherry blossoms, and a small wooden bridge at sunset."
}
],
"max_tokens": 4096
}'POST /llm/gemini/v1beta/openai/chat/completions