{"openapi":"3.1.0","info":{"title":"Oil API","version":"0.3.0","description":"oiloil 共用的账号、积分和 AI 接口。各服务由服务端配置独立启用。"},"servers":[{"url":"https://api.oiloil.org"}],"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","description":"oiloil 账号的令牌"}},"schemas":{"PolishResponse":{"type":"object","properties":{"id":{"type":"string","description":"请求编号","example":"req_9f2c1d7a4b6e4c0a"},"text":{"type":"string","description":"润色后的文字，请求用 text 时返回"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PolishResultItem"},"description":"润色后的各条文字，顺序和 id 与请求一致，请求用 items 时返回"},"usage":{"type":"object","properties":{"characters":{"type":"integer","description":"原文的字符数：text 或各条 items 的字符数之和"},"credits":{"type":"number","description":"这次扣的积分","example":3.42},"balance":{"type":"number","description":"扣完以后账号剩余的积分","example":96.58}},"required":["characters","credits"]}},"required":["id","usage"]},"PolishResultItem":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"}},"required":["id","text"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"invalid_request"},"message":{"type":"string","example":"text 和 items 需要提供其中一个"},"param":{"type":"string","description":"出错的参数","example":"text"}},"required":["code","message"]},"request_id":{"type":"string"}},"required":["error","request_id"]},"PolishRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"description":"要润色的一段或一篇文字。和 items 二选一","example":"值得注意的是，这次更新为后续增长奠定了坚实的基础。"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PolishItem"},"minItems":1,"maxItems":100,"description":"一批互相独立的文字，最多 100 条。和 text 二选一"},"context":{"type":"string","maxLength":4000,"description":"背景：文字用在哪里、产品或主题是什么、读者是谁、有哪些已经确认的事实。润色时可以引用这里的事实，这里和原文都没有的内容不会加入。不传时，空泛的句子只能写短","example":"团队共享日历的官网首页，读者是第一次听说这个产品的小团队负责人。产品把所有人的空闲时间放在一个视图里。"},"reorder":{"type":"boolean","default":false,"description":"是否允许调整句子和段落的顺序。默认只改表达，保留原有顺序"}}},"PolishItem":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200,"description":"调用方自己的标识，原样返回","example":"hero.title"},"text":{"type":"string","minLength":1,"description":"要润色的文字","example":"赋能团队高效协作"},"note":{"type":"string","maxLength":300,"description":"只针对这一条的说明：它出现在哪里、有什么限制","example":"首屏主标题，不超过 12 个字"}},"required":["id","text"]},"Usage":{"type":"object","properties":{"balance":{"type":"number","description":"剩余积分","example":96.58},"month":{"type":"object","properties":{"calls":{"type":"integer","description":"近 30 天的调用次数"},"credits":{"type":"number","description":"近 30 天扣的积分"}},"required":["calls","credits"]},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"请求编号"},"at":{"type":"string","description":"调用时间，ISO 8601"},"characters":{"type":"integer","description":"原文字符数"},"credits":{"type":"number","description":"扣的积分"}},"required":["id","at","characters","credits"]},"description":"最近 20 次调用，新的在前"}},"required":["balance","month","recent"]},"Credits":{"type":"object","properties":{"balance":{"type":"number","description":"剩余积分","example":996.58}},"required":["balance"]},"StudioAssistantGeneration":{"type":"object","properties":{"task":{"type":"string","enum":["refine","proofread"]},"request":{"type":"object","properties":{"contents":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","model"]},"parts":{"type":"array","items":{"type":"object","additionalProperties":{}},"minItems":1,"maxItems":100}},"required":["role","parts"],"additionalProperties":false},"minItems":1,"maxItems":100},"systemInstruction":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":false},"minItems":1,"maxItems":4}},"required":["parts"],"additionalProperties":false},"tools":{"type":"array","items":{"type":"object","properties":{"functionDeclarations":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":80},"description":{"type":"string","maxLength":4000},"parameters":{"type":"object","additionalProperties":{}}},"required":["name","description"],"additionalProperties":false},"maxItems":12}},"required":["functionDeclarations"],"additionalProperties":false},"maxItems":1},"generationConfig":{"type":"object","properties":{"maxOutputTokens":{"type":"integer","minimum":1,"maximum":24000},"thinkingConfig":{"type":"object","properties":{"thinkingLevel":{"type":"string"}},"required":["thinkingLevel"],"additionalProperties":false}},"required":["maxOutputTokens"],"additionalProperties":false}},"required":["contents","systemInstruction","generationConfig"],"additionalProperties":false}},"required":["task","request"],"additionalProperties":false}},"parameters":{}},"paths":{"/v1/text/polish":{"post":{"tags":["文字"],"summary":"润色文案","security":[{"ApiKey":[]}],"description":"按 oil-tone 写作规范润色中文或英文文案，让文字自然、易读、通顺、清楚。只改表达，不加入原文和背景里没有的事实。","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolishRequest"}}}},"responses":{"200":{"description":"润色结果","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolishResponse"}}}},"400":{"description":"参数不合法","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"令牌无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分不够","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"权限不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"请求停止或上传超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"请求已处理或处理中","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"请求过大","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求太频繁","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"模型服务返回的结果不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"服务暂不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"模型服务响应超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/usage":{"get":{"tags":["账户"],"summary":"查询余额和最近的调用","security":[{"ApiKey":[]}],"responses":{"200":{"description":"余额和用量","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"400":{"description":"参数不合法","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"令牌无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分不够","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"权限不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"请求停止或上传超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"请求已处理或处理中","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"请求过大","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求太频繁","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"模型服务返回的结果不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"服务暂不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"模型服务响应超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/credits":{"get":{"tags":["账户"],"summary":"查询积分余额","security":[{"ApiKey":[]}],"responses":{"200":{"description":"余额","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credits"}}}},"400":{"description":"参数不合法","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"令牌无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分不够","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"权限不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"请求停止或上传超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"请求已处理或处理中","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"请求过大","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求太频繁","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"模型服务返回的结果不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"服务暂不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"模型服务响应超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/studio/assistant/generate":{"post":{"tags":["Oil Studio"],"summary":"内置助手的一轮模型生成","security":[{"ApiKey":[]}],"description":"用于精剪和字幕校对。需要 Idempotency-Key 与 X-Oil-Run-ID 两个 UUID；同一运行最多 20 轮，费率按开始时锁定。","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioAssistantGeneration"}}}},"responses":{"200":{"description":"完成校验并结算后的 Gemini SSE；响应头包含本轮积分和可用余额","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"参数不合法","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"令牌无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分不够","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"权限不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"请求停止或上传超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"请求已处理或处理中","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"请求过大","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求太频繁","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"模型服务返回的结果不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"服务暂不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"模型服务响应超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/keys":{"get":{"tags":["账户"],"summary":"列出自己的 API Key（仅设备令牌）","security":[{"ApiKey":[]}],"responses":{"200":{"description":"不包含原文或摘要","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"prefix":{"type":"string"},"created_at":{"type":"string"},"last_used_at":{"type":["string","null"]},"revoked_at":{"type":["string","null"]}},"required":["id","name","prefix","created_at","last_used_at","revoked_at"]}}},"required":["keys"]}}}},"400":{"description":"参数不合法","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"令牌无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分不够","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"权限不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"请求停止或上传超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"请求已处理或处理中","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"请求过大","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求太频繁","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"模型服务返回的结果不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"服务暂不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"模型服务响应超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["账户"],"summary":"创建 API Key（仅设备令牌）","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"原文仅返回这一次，请安全保存","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"key":{"type":"string"}},"required":["id","key"]}}}},"400":{"description":"参数不合法","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"令牌无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分不够","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"权限不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"请求停止或上传超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"请求已处理或处理中","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"请求过大","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求太频繁","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"模型服务返回的结果不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"服务暂不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"模型服务响应超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/keys/{id}":{"delete":{"tags":["账户"],"summary":"撤销自己的 API Key（仅设备令牌）","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"已撤销","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"type":"boolean"}},"required":["revoked"]}}}},"400":{"description":"参数不合法","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"令牌无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分不够","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"权限不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"请求停止或上传超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"请求已处理或处理中","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"请求过大","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求太频繁","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"模型服务返回的结果不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"服务暂不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"模型服务响应超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/studio/runs/{id}":{"get":{"tags":["Oil Studio"],"security":[{"ApiKey":[]}],"summary":"查询自己的任务状态","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"操作结果","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["running","committed","failed","cancelled"]},"credits":{"type":"number"},"balance":{"type":"number"},"final_attested":{"type":"boolean"}},"required":["state","credits","balance"]}}}},"400":{"description":"参数不合法","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"令牌无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分不够","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"权限不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"请求停止或上传超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"请求已处理或处理中","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"请求过大","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求太频繁","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"模型服务返回的结果不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"服务暂不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"模型服务响应超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/studio/runs/{id}/finish":{"post":{"tags":["Oil Studio"],"security":[{"ApiKey":[]}],"summary":"确认本地任务成功，一次结算","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"操作结果","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["running","committed","failed","cancelled"]},"credits":{"type":"number"},"balance":{"type":"number"},"final_attested":{"type":"boolean"}},"required":["state","credits","balance"]}}}},"400":{"description":"参数不合法","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"令牌无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分不够","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"权限不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"请求停止或上传超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"请求已处理或处理中","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"请求过大","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求太频繁","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"模型服务返回的结果不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"服务暂不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"模型服务响应超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/studio/runs/{id}/cancel":{"post":{"tags":["Oil Studio"],"security":[{"ApiKey":[]}],"summary":"停止未结算任务，释放预留","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["failed","cancelled"]}},"required":["reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"操作结果","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","enum":["running","committed","failed","cancelled"]},"credits":{"type":"number"},"balance":{"type":"number"},"final_attested":{"type":"boolean"}},"required":["state","credits","balance"]}}}},"400":{"description":"参数不合法","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"令牌无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分不够","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"权限不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"请求停止或上传超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"请求已处理或处理中","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"请求过大","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求太频繁","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"模型服务返回的结果不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"服务暂不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"模型服务响应超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/topups":{"post":{"tags":["账户"],"security":[{"ApiKey":[]}],"summary":"创建积分充值订单","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount_usd":{"anyOf":[{"type":"number","enum":[10]},{"type":"number","enum":[20]},{"type":"number","enum":[50]}]}},"required":["amount_usd"],"additionalProperties":false}}}},"responses":{"200":{"description":"操作结果","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":["string","null"]},"amount_usd":{"type":"number"},"credits":{"type":"number"},"status":{"type":"string","enum":["creating","open","paid","expired"]},"paid":{"type":"boolean"}},"required":["id","url","amount_usd","credits","status","paid"]}}}},"400":{"description":"参数不合法","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"令牌无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分不够","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"权限不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"请求停止或上传超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"请求已处理或处理中","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"请求过大","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求太频繁","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"模型服务返回的结果不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"服务暂不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"模型服务响应超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/topups/{id}":{"get":{"tags":["账户"],"security":[{"ApiKey":[]}],"summary":"核验自己订单的支付状态","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"操作结果","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":["string","null"]},"amount_usd":{"type":"number"},"credits":{"type":"number"},"status":{"type":"string","enum":["creating","open","paid","expired"]},"paid":{"type":"boolean"}},"required":["id","url","amount_usd","credits","status","paid"]}}}},"400":{"description":"参数不合法","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"令牌无效","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"积分不够","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"权限不足","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"请求停止或上传超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"请求已处理或处理中","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"请求过大","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"请求太频繁","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"模型服务返回的结果不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"服务暂不可用","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"模型服务响应超时","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{}}