Imagen 生成图片
POST /v1beta/models/imagen-4.0-ultra-generate-001:predict
说明
概览
| Method | POST |
|---|---|
| Path | /v1beta/models/imagen-4.0-ultra-generate-001:predict |
| Type | http |
| Status | 1 |
| Module | 2102810 |
| Folder | 61214320 |
参数
{ "query": [ { "name": "key", "required": true, "description": "", "id": "GsBYee3kKi", "type": "string", "enable": true, "sampleValue": "{{YOUR_API_KEY}}" } ], "header": [ { "name": "Content-Type", "required": true, "description": "", "id": "f9z3Ac0sW3", "type": "string", "enable": true, "sampleValue": "application/json" } ] }
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "type": "object", "properties": { "contents": { "type": "array", "items": { "type": "object", "properties": { "parts": { "type": "array", "items": { "type": "object", "properties": { "inline_data": { "type": "object", "properties": { "mime_type": { "type": "string" }, "data": { "type": "string" } }, "required": [ "mime_type", "data" ] }, "text": { "type": "string" } }, "required": [] } } } } } }, "required": [ "contents" ] }, "required": false, "mediaType": "", "examples": [ { "mediaType": "application/json", "value": "{\n \"instances\": [\n {\n \"prompt\": \"Robot holding a red skateboard\"\n }\n ],\n \"parameters\": {\n \"sampleCount\": 4\n }\n}", "name": "示例" } ], "oasExtensions": "" }
响应
[ { "id": 769461969, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": {} }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [], "oasExtensions": "" } ]