创建任务 recraft-ai/recraft-v3

POST /replicate/v1/models/recraft-ai/recraft-v3/predictions

MethodPOST
Path/replicate/v1/models/recraft-ai/recraft-v3/predictions
Typehttp
Status1
Module2102810
Folder62419371

说明

概览

MethodPOST
Path/replicate/v1/models/recraft-ai/recraft-v3/predictions
Typehttp
Status1
Module2102810
Folder62419371

参数

{
  "query": [],
  "path": [],
  "cookie": [],
  "header": [
    {
      "required": false,
      "description": "",
      "type": "string",
      "id": "GTujCrB2It",
      "enable": true,
      "name": "Authorization",
      "sampleValue": "Bearer {{YOUR_API_KEY}}"
    }
  ]
}

请求体

{
  "type": "application/json",
  "parameters": [],
  "jsonSchema": {
    "type": "object",
    "properties": {
      "input": {
        "type": "object",
        "properties": {
          "size": {
            "type": "string",
            "description": "生成图像的宽度和高度。如果设置了宽高比,则忽略尺寸。默认值:“1024x1024”"
          },
          "style": {
            "type": "string",
            "description": "生成的图像的风格。默认值:\"any\""
          },
          "prompt": {
            "type": "string",
            "description": "图像生成的文字提示。"
          },
          "aspect_ratio": {
            "type": "string",
            "description": "生成图像的长宽比。默认值:\"Not set\""
          }
        },
        "required": [
          "prompt"
        ],
        "x-apifox-orders": [
          "size",
          "style",
          "prompt",
          "aspect_ratio"
        ]
      }
    },
    "x-apifox-orders": [
      "input"
    ]
  },
  "mediaType": "",
  "examples": [
    {
      "value": "{\n    \"input\": {\n      \"size\": \"1365x1024\",\n      \"style\": \"any\",\n      \"prompt\": \"a wildlife photography photo of a red panda using a laptop in a snowy forest\",\n      \"aspect_ratio\": \"Not set\"\n    }\n  }",
      "mediaType": "application/json",
      "description": ""
    }
  ],
  "oasExtensions": ""
}

响应

[
  {
    "id": 728720400,
    "name": "成功",
    "code": 200,
    "contentType": "json",
    "jsonSchema": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "model": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "input": {
          "type": "object",
          "properties": {
            "aspect_ratio": {
              "type": "string"
            },
            "input_image": {
              "type": "string"
            },
            "output_format": {
              "type": "string"
            },
            "prompt": {
              "type": "string"
            },
            "prompt_upsampling": {
              "type": "boolean"
            },
            "safety_tolerance": {
              "type": "integer"
            }
          },
          "required": [
            "aspect_ratio",
            "input_image",
            "output_format",
            "prompt",
            "prompt_upsampling",
            "safety_tolerance"
          ]
        },
        "logs": {
          "type": "string"
        },
        "output": {
          "type": "null"
        },
        "data_removed": {
          "type": "boolean"
        },
        "error": {
          "type": "null"
        },
        "status": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "urls": {
          "type": "object",
          "properties": {
            "cancel": {
              "type": "string"
            },
            "get": {
              "type": "string"
            },
            "stream": {
              "type": "string"
            },
            "web": {
              "type": "string"
            }
          },
          "required": [
            "cancel",
            "get",
            "stream",
            "web"
          ]
        }
      },
      "required": [
        "id",
        "model",
        "version",
        "input",
        "logs",
        "output",
        "data_removed",
        "error",
        "status",
        "created_at",
        "urls"
      ]
    },
    "itemSchema": {},
    "description": "",
    "mediaType": "",
    "headers": [],
    "oasExtensions": ""
  }
]

响应示例

[
  {
    "name": "成功示例",
    "responseId": 728720400,
    "data": "{\n    \"id\": \"w5k77rccg1rma0crb40tssh86g\",\n    \"model\": \"recraft-ai/recraft-v3\",\n    \"version\": \"hidden\",\n    \"input\": {\n        \"aspect_ratio\": \"Not set\",\n        \"prompt\": \"a wildlife photography photo of a red panda using a laptop in a snowy forest\",\n        \"size\": \"1365x1024\",\n        \"style\": \"any\"\n    },\n    \"logs\": \"\",\n    \"output\": null,\n    \"data_removed\": false,\n    \"error\": null,\n    \"status\": \"starting\",\n    \"created_at\": \"2025-07-30T01:45:30.496Z\",\n    \"urls\": {\n        \"cancel\": \"https://api.replicate.com/v1/predictions/w5k77rccg1rma0crb40tssh86g/cancel\",\n        \"get\": \"https://api.replicate.com/v1/predictions/w5k77rccg1rma0crb40tssh86g\",\n        \"stream\": \"https://stream.replicate.com/v1/files/bcwr-otkjt5aiey7d63eore5rhoezsvrxwsc5q6ow2x5lpqh3l6x33hgq\",\n        \"web\": \"https://replicate.com/p/w5k77rccg1rma0crb40tssh86g\"\n    }\n}",
    "description": "",
    "oasKey": "",
    "oasExtensions": "",
    "id": 648888622
  }
]