Imagen 4 开发中

POST /v1beta/models/imagen-4.0-generate-001:predict

MethodPOST
Path/v1beta/models/imagen-4.0-generate-001:predict
Typehttp
Status0
Module2102810
Folder61214320

说明

概览

MethodPOST
Path/v1beta/models/imagen-4.0-generate-001:predict
Typehttp
Status0
Module2102810
Folder61214320

参数

{
  "query": [
    {
      "name": "key",
      "required": true,
      "description": "",
      "id": "7swWlUit42",
      "type": "string",
      "enable": true,
      "sampleValue": "{{YOUR_API_KEY}}"
    }
  ],
  "header": [
    {
      "name": "Content-Type",
      "required": true,
      "description": "",
      "id": "Rs7BP3lYDQ",
      "type": "string",
      "enable": true,
      "sampleValue": "application/json"
    }
  ]
}

请求体

{
  "type": "application/json",
  "parameters": [],
  "jsonSchema": {
    "type": "object",
    "properties": {
      "instances": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "prompt": {
              "type": "string"
            }
          }
        }
      },
      "parameters": {
        "type": "object",
        "properties": {
          "sampleCount": {
            "type": "integer"
          }
        },
        "required": [
          "sampleCount"
        ]
      }
    },
    "required": [
      "instances",
      "parameters"
    ]
  },
  "required": false,
  "mediaType": "",
  "examples": [
    {
      "mediaType": "application/json",
      "value": "{\n  \"instances\": [\n    {\n      \"prompt\": \"小女孩\"\n    }\n  ],\n  \"parameters\": {\n    \"sampleCount\": 4\n  }\n}",
      "name": "示例"
    }
  ],
  "oasExtensions": ""
}

响应

[
  {
    "id": 692071121,
    "name": "成功",
    "code": 200,
    "contentType": "json",
    "jsonSchema": {
      "type": "object",
      "properties": {}
    },
    "itemSchema": {},
    "description": "",
    "mediaType": "",
    "headers": [],
    "oasExtensions": ""
  }
]