AI 服务/图像生成
生成图像
接口说明:同步生成图像,根据所选模型与提示词返回生成结果。
POST
生成图像
授权
AiToEarn Open Platform API Key。
请求体
application/json
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
接口说明:同步生成图像,根据所选模型与提示词返回生成结果。
curl --request POST \
--url https://aitoearn.cn/api/ai/image/generate \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"prompt": "<string>",
"model": "<string>"
}
'{
"code": 0,
"message": "请求成功",
"data": {
"created": 1,
"list": [
{
"url": "string",
"b64_json": "string",
"revised_prompt": "string"
}
],
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"total_tokens": 1
},
"background": "string",
"output_format": "string",
"quality": "string",
"size": "string"
}
}AiToEarn Open Platform API Key。
请求已被服务处理。业务是否成功以响应体 code === 0 为准。
业务状态码。0 表示成功,非 0 表示业务错误。
响应消息。
Hide child attributes
创建时间戳
背景
输出格式
质量档位
图片尺寸
请求 ID。
错误响应时间戳,Unix 毫秒。
curl --request POST \
--url https://aitoearn.cn/api/ai/image/generate \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"prompt": "<string>",
"model": "<string>"
}
'{
"code": 0,
"message": "请求成功",
"data": {
"created": 1,
"list": [
{
"url": "string",
"b64_json": "string",
"revised_prompt": "string"
}
],
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"total_tokens": 1
},
"background": "string",
"output_format": "string",
"quality": "string",
"size": "string"
}
}