文档

快速开始

几分钟内开始使用 Renderful API。按照以下步骤发起您的第一个 API 请求。

1. 获取您的 API 密钥

Create an API key from the API 密钥页面. Keep this key secure and never expose it in client-side code.

2. 发起您的第一个请求

curl -X POST https://api.renderful.ai/api/v1/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "text-to-image",
    "model": "flux-dev",
    "prompt": "A beautiful sunset over mountains"
  }'

3. 处理响应

{
  "id": "gen_abc123",
  "status": "processing",
  "model": "flux-dev",
  "created_at": "2024-01-15T10:30:00Z"
}

轮询生成状态或配置 webhook 以在完成时收到通知。