1. 创建 API Key
进入 APIAny.AI 控制台,在 API Keys 页面创建项目密钥。2. 获取模型列表
3. 调用对话模型
4. 创建图片任务
task_id。随后通过任务查询接口轮询结果:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
发送第一条 APIAny.AI 请求。
curl https://apiany.ai/v1/models \
-H "Authorization: Bearer $APIANY_API_KEY"
curl https://apiany.ai/v1/chat/completions \
-H "Authorization: Bearer $APIANY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4",
"messages": [
{ "role": "user", "content": "为 APIAny.AI 写一句简短的产品标语。" }
]
}'
curl https://apiany.ai/v1/images/generations \
-H "Authorization: Bearer $APIANY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana",
"prompt": "A clean product hero image for an AI API gateway",
"size": "1k"
}'
task_id。随后通过任务查询接口轮询结果:
curl https://apiany.ai/v1/tasks/task_123 \
-H "Authorization: Bearer $APIANY_API_KEY"