快速开始
创建 API 密钥,几分钟内运行第一个图片、视频或音乐任务。
创建 API Key
在控制台设置密钥名称和有效期,也可选择永久有效。新密钥包含所有标准 API 权限,登录后可再次查看。不要将密钥写入客户端代码或公开仓库。
发送第一个请求
创建 API Key,导出为 HERMES_API_KEY,然后运行以下请求。它由以下模型的 schema 生成: nano-banana-pro-text-to-image-economy.
shell
export HERMES_API_KEY=your_api_key# 1. Submit the task (asynchronous; returns 202 with a task id)
curl -X POST https://api.hermes-ai.net/api/v1/jobs \
-H "Authorization: Bearer $HERMES_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "nano-banana-pro-text-to-image-economy",
"input": {
"prompt": "A lighthouse on a rocky coast at sunrise, soft light",
"resolution": "1k"
}
}'
# 2. Poll until status is succeeded, failed or reconciliation_required
curl https://api.hermes-ai.net/api/v1/jobs/TASK_ID \
-H "Authorization: Bearer $HERMES_API_KEY"调用其他模型
调用其他模型时,修改 model 和 input 即可。每个模型页面都有专属示例: 浏览模型