ON.1-API 文档、API 调试、API Mock、API 自动化测试!
| 接口类型 | 端点 | 说明 |
|---|---|---|
| OpenAI聊天接口 | /v1/chat/completions | 支持流、非流 连续对话、不支持尺寸 |
| OpenAI图片生成接口 | /v1/image/generations | 文生图、支持尺寸 |
| OpenAI图片编辑接口 | /v1/image/edits | 图生图(支持传入1~6张图)、支持尺寸 |
curl --location --request POST 'https://api.rcouyi.com/v1/images/edits' \
--header 'Authorization: Bearer <token>' \
--form 'image=@""' \
--form 'prompt=""' \
--form 'model=""' \
--form 'response_format="url"' \
--form 'size=""' \
--form 'aspect_ratio=""'{
"created": 1745984918,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAABAAAAAYACAI..."
}
],
"usage": {
"input_tokens": 1298,
"input_tokens_details": {
"image_tokens": 1290,
"text_tokens": 8
},
"output_tokens": 1308,
"total_tokens": 1316
}
}