- Introduction
- Quick Start Guide
- Make a request
- Chat Models
- ChatGpt
- ChatGPT (Audio)
- ChatGPT (Chat)
- Chat completion object
- Create chat completion (streaming)
- Create chat completion (non-streaming)
- Create chat image recognition (streaming)
- Create chat image recognition (streaming) base64
- Create chat image recognition (non-streaming)
- Function calling
- N choices
- Create chat function call (only non-streaming)
- Create structured output
- ChatGPT (Completions)
- ChatGPT(Embeddings)
- Anthropic Claude
- Gemini
- Image Models
- GPT-IMAGE-1
- MJ
- Ideogram
- Kling Image
- Flux
- Recraft API
- Models use Dall-e Format
- DALL·E 3POST
- Video Models
- Kling Video
- Runway ML Video
- Luma Video
- Pika Video
- Google Veo
- Minimax - Hailuo
- Music Model - Suno
- Illustrate
- Parameter
- Task submission
- Query interface
- Python Samples
- python openai official library (using AutoGPT, langchain, etc.)
- Python uses speech to text
- Python uses text to speech
- Python uses Embeddings
- python calls DALL·E
- python simple call openai function-calling demo
- python langchain
- python llama_index
- Python uses gpt-4o to identify pictures-local pictures
- python library streaming output
- Python uses gpt-4o to identify images
- Plug-in/software usage tutorials
- Help Center
- Tutorials
Google Imagen
POST
/v1/images/generations
Request
Header Params
Authorization
string
optional
Example:
Bearer {{YOUR_API_KEY}}
Body Params application/json
model
string
optional
prompt
string
required
response_format
string
optional
url
or b64_json
.aspect_ratio
string
optional
Image ratios and resolutions
1:1: 1024x1024
3:4: 896x1280
4:3: 1280x896
9:16: 768x1408
16:9: 1408x768
Example
{
"model": "imagen4",
"prompt": "A person walking in the forest",
"aspect_ratio": "1:1",
"response_format": "url"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/v1/images/generations' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "imagen4",
"prompt": "A person walking in the forest",
"aspect_ratio": "1:1",
"response_format": "url"
}'
Responses
🟢200Create image
application/json
Body
data
array [object {1}]
required
url
string
required
created
integer
required
Example
{
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}
Modified at 2025-06-27 09:12:47