Theme
Imagen Generate Image
POST
https://www.kkiai.com/v1beta/models/imagen-4.0-ultra-generate-001:predict
Official documentation: https://ai.google.dev/gemini-api/docs/document-processing?hl=zh-cn
Request Parameters
Authorization
Add the Authorization parameter to the Header. Its value is the Token concatenated after Bearer.
Example: Authorization: Bearer ********************
Query Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
key | string | Required | {{YOUR_API_KEY}} |
Header Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
Content-Type | string | Required | application/json |
Body Parameters (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
contents | array[object] | Required | |
└ parts | array[object] | Optional |
Request Example
json
{
"instances": [
{
"prompt": "Robot holding a red skateboard"
}
],
"parameters": {
"sampleCount": 4
}
}cURL Example
bash
curl --location -g --request POST 'https://www.kkiai.com/v1beta/models/imagen-4.0-ultra-generate-001:predict?key=' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"instances": [
{
"prompt": "Robot holding a red skateboard"
}
],
"parameters": {
"sampleCount": 4
}
}'Response
🟢 200 Success
Response Example
json
{}