接口地址: https://api.youyacao.com/api/aidraw
返回格式: JSON
请求方式: GET
请求示例: https://api.youyacao.com/api/aidraw?key=cat
名称 | 必填 | 类型 | 说明 |
---|---|---|---|
key | 是 | string | 关键词 |
名称 | 类型 | 说明 |
---|
{ "code": 200, "msg": "success", "data": { "id": "chatcmpl-89Dw3cGjGYlR", "object": "chat.completion", "created": 1715093127, "model": "stable-diffusion", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "绘制中...\n![cat.png](https://pfst.cf2.poecdn.net/base/image/5b80f70958bb8710790570888ac7c08e9ab66e737584f99f7fcd47b266fa5b43?w=1024&h=1024&pmaid=78574270)" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 8, "completion_tokens": 75, "total_tokens": 83 } } }
请求参数设置:
参数名称 | 参数值 |
---|---|
{ "code": 200, "msg": "success", "data": { "id": "chatcmpl-89Dw3cGjGYlR", "object": "chat.completion", "created": 1715093127, "model": "stable-diffusion", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "绘制中...\n![cat.png](https://pfst.cf2.poecdn.net/base/image/5b80f70958bb8710790570888ac7c08e9ab66e737584f99f7fcd47b266fa5b43?w=1024&h=1024&pmaid=78574270)" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 8, "completion_tokens": 75, "total_tokens": 83 } } }
错误码格式说明:
名称 | 类型 | 说明 |
---|
代码示例:
使用案例平台查看
平台名称 | 平台图标 | 平台地址 |
---|