YIR_API_KEY。
一个幂等键只代表一个逻辑请求。相同请求重试时复用它,新任务则生成新值。
- KIE 兼容
- APIMart 兼容
提交后从
data.taskId 读取任务 ID,再通过 recordInfo 查询。Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
通过两条已认证的来源兼容入口提交并查询 GPT Image 2 文生图任务。
YIR_API_KEY。
data.taskId 读取任务 ID,再通过 recordInfo 查询。curl --request POST \
--url "https://gateway.yir.ai/kie/api/v1/jobs/createTask" \
--header "Authorization: Bearer $YIR_API_KEY" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: $YIR_IDEMPOTENCY_KEY" \
--data '{"model":"gpt-image-2-text-to-image","input":{"prompt":"A quiet observatory above a sea of clouds","resolution":"1K","aspect_ratio":"1:1"}}'
data[0].task_id 读取任务 ID,再通过任务路径查询。curl --request POST \
--url "https://gateway.yir.ai/apimart/v1/images/generations" \
--header "Authorization: Bearer $YIR_API_KEY" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: $YIR_IDEMPOTENCY_KEY" \
--data '{"model":"gpt-image-2","prompt":"A quiet observatory above a sea of clouds","size":"1:1","resolution":"1k","n":1}'