Skip to content

查询任务

OpenAPI Specification

yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /replicate/v1/predictions/{任务id}:
    get:
      summary: 查询任务
      deprecated: false
      description: '官方文档: https://replicate.com/black-forest-labs/flux-kontext-max'
      tags:
        - Replicate 聚合平台
      parameters:
        - name: 任务id
          in: path
          description: ''
          required: true
          example: w44zs9cet5rmc0cqzp49gpkhf8
          schema:
            type: string
        - name: Authorization
          in: header
          description: ''
          required: false
          example: Bearer {{YOUR_API_KEY}}
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  logs:
                    type: string
                  urls:
                    type: object
                    properties:
                      get:
                        type: string
                      web:
                        type: string
                      cancel:
                        type: string
                      stream:
                        type: string
                    required:
                      - get
                      - web
                      - cancel
                      - stream
                  error:
                    type: 'null'
                  input:
                    type: object
                    properties:
                      prompt:
                        type: string
                      input_image:
                        type: string
                      aspect_ratio:
                        type: string
                      output_format:
                        type: string
                      safety_tolerance:
                        type: integer
                      prompt_upsampling:
                        type: boolean
                    required:
                      - prompt
                      - input_image
                      - aspect_ratio
                      - output_format
                      - safety_tolerance
                      - prompt_upsampling
                  model:
                    type: string
                  output:
                    type: string
                  status:
                    type: string
                  metrics:
                    type: object
                    properties:
                      image_count:
                        type: integer
                      predict_time:
                        type: number
                    required:
                      - image_count
                      - predict_time
                  version:
                    type: string
                  created_at:
                    type: string
                  started_at:
                    type: string
                  completed_at:
                    type: string
                  data_removed:
                    type: boolean
                required:
                  - id
                  - logs
                  - urls
                  - error
                  - input
                  - model
                  - output
                  - status
                  - metrics
                  - version
                  - created_at
                  - started_at
                  - completed_at
                  - data_removed
              examples:
                '1':
                  summary: Create image
                  value:
                    created: 1589478378
                    data:
                      - url: https://...
                      - url: https://...
                '2':
                  summary: 成功示例
                  value:
                    id: w44zs9cet5rmc0cqzp49gpkhf8
                    logs: |
                      Starting generate image
                      Using seed: 29889
                      Total safe images: 1 out of 1
                      generate image took 3.53 seconds
                    urls:
                      get: >-
                        https://api.replicate.com/v1/predictions/w44zs9cet5rmc0cqzp49gpkhf8
                      web: https://replicate.com/p/w44zs9cet5rmc0cqzp49gpkhf8
                      cancel: >-
                        https://api.replicate.com/v1/predictions/w44zs9cet5rmc0cqzp49gpkhf8/cancel
                      stream: >-
                        https://stream.replicate.com/v1/files/bcwr-h7bu76ujftxzwih5u35puoysogps56mqvpvjz4nrxskhfe7ks42a
                    error: null
                    input:
                      prompt: Make the letters 3D, floating in space on a city street
                      input_image: >-
                        https://replicate.delivery/xezq/XfwWjHJ7HfrmXE6ukuLVEpXWfeQ3PQeRI5mApuLXRxST7XMmC/tmpc91tlq20.png
                      aspect_ratio: match_input_image
                      output_format: jpg
                      safety_tolerance: 2
                      prompt_upsampling: false
                    model: black-forest-labs/flux-kontext-dev
                    output: >-
                      https://replicate.delivery/xezq/FB7iNUmvHJ4NHFIMPea2hEoa4N4mTbwf3GBQjGzGQ4yeD4fTB/output.jpg
                    status: succeeded
                    metrics:
                      image_count: 1
                      predict_time: 3.590520183
                    version: hidden
                    created_at: '2025-07-12T07:27:54.577Z'
                    started_at: '2025-07-12T07:27:54.587120975Z'
                    completed_at: '2025-07-12T07:27:58.177641162Z'
                    data_removed: false
          headers: {}
          x-apifox-name: 成功
      security:
        - bearer: []
      x-apifox-folder: Replicate 聚合平台
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/5443236/apis/api-326395247-run
components:
  schemas: {}
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://www.anyapi.vip
    description: 正式环境
security:
  - bearer: []

AnyAPI — 专业的 AI 接口聚合服务