获取请求结果
OpenAPI Specification
yaml
openapi: 3.0.1
info:
title: ''
description: "本页接口说明详见下方接口定义;参数取值与返回以本平台实测为准。"
version: 1.0.0
paths:
/fal/{platform}/model_name/requests/request_id:
get:
summary: 获取请求结果
deprecated: false
description: "本页为 Fal.ai 兼容格式的请求结果查询接口。返回包含生成图片数组、随机种子与耗时信息;参数与返回以本平台实测为准。"
tags:
- Fal.ai 平台兼容
parameters:
- name: platform
in: path
description: "该字段的取值与含义以本平台实际返回为准。"
required: true
schema:
type: string
- name: Content-Type
in: header
description: "该字段的取值与含义以本平台实际返回为准。"
required: false
example: application/json
schema:
type: string
- name: Authorization
in: header
description: "该字段的取值与含义以本平台实际返回为准。"
required: false
example: Bearer {{YOUR_API_KEY}}
schema:
type: string
default: Bearer {{YOUR_API_KEY}}
responses:
'200':
description: "该字段的取值与含义以本平台实际返回为准。"
content:
application/json:
schema:
type: object
required:
- images
- seed
- has_nsfw_concepts
- prompt
- timings
properties:
images:
type: array
items:
type: object
required:
- url
- content_type
properties:
url:
type: string
description: "生成图片的下载地址"
content_type:
type: string
description: "图片 MIME 类型,如 image/jpeg"
description: "生成图片的文件信息数组"
seed:
type: integer
description: "生成图片时使用的随机种子"
has_nsfw_concepts:
type: array
items:
type: boolean
description: "判断每张图片是否包含敏感内容"
prompt:
type: string
description: "本次图片生成使用的提示词"
timings:
type: object
description: "请求与生成耗时信息"
properties: {}
example:
cancel_url: >-
https://api.example.com/fal-ai/flux-1/requests/9c1e0a2b-7d44-4f10-9a53-2b1c8e6d0f11/cancel
has_nsfw_concepts:
- false
images:
- content_type: image/jpeg
height: 768
url: >-
https://files.example.com/files/b/0a995c44/saUxQYNhUY3Id6Xh9Mk-s.jpg
width: 1024
logs: null
metrics:
inference_time: 7.414219856262207
prompt: >-
Extreme close-up of a single tiger eye, direct frontal view.
Detailed iris and pupil. Sharp focus on eye texture and color.
Natural lighting to capture authentic eye shine and depth. The
word "FLUX" is painted over it in big, white brush strokes
with visible texture.
request_id: 9c1e0a2b-7d44-4f10-9a53-2b1c8e6d0f11
response_url: >-
https://api.example.com/fal-ai/flux-1/requests/9c1e0a2b-7d44-4f10-9a53-2b1c8e6d0f11
seed: 1785000000
status: COMPLETED
status_url: >-
https://api.example.com/fal-ai/flux-1/requests/9c1e0a2b-7d44-4f10-9a53-2b1c8e6d0f11/status
timings:
inference: 7.115621507997275
unit_price: '0.025'
headers: {}
security: []
components:
schemas: {}
securitySchemes: {}
servers: []
security: []
使用提示:本页接口的 Base URL 为
https://api.allyang.cn,请求头需携带Authorization: Bearer <令牌>(令牌在控制台「令牌管理」中创建)。示例中的任务 ID、时间戳与文件地址均为示意值,实际以平台返回为准。本页为聚合平台兼容格式,模型可用性与计费以本平台「模型广场」公布为准。