ドキュメント
ドキュメント
認証
すべてのAPIリクエストはBearerトークンを使用した認証が必要です。
APIキーの使用
すべてのリクエストのAuthorizationヘッダーにAPIキーを含めてください:
Authorization: Bearer ${RENDERFUL_API_KEY}Developer API keys typically start with sk_ (legacy keys may start with vega_). Agent keys start with rf_.
リクエスト例
curl -X POST https://api.renderful.ai/api/v1/generations \
-H "Authorization: Bearer ${RENDERFUL_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"type":"text-to-image","model":"flux-dev","prompt":"A sunset"}'セキュリティのベストプラクティス
- • クライアント側のコードにAPIキーを絶対に公開しない
- • 環境変数を使用してキーを保存する
- • 定期的にキーをローテーションする
- • 開発環境と本番環境で異なるキーを使用する
Balance endpoints by key type
Use the balance endpoint that matches the key prefix you are authenticating with.
| Key Type | Prefix | Balance Endpoint |
|---|---|---|
| Developer API key | sk_ / vega_ | GET /api/v1/account/balance |
| Agent API key | rf_ | GET /api/v1/agents/balance |
Query developer balance
curl -X GET https://api.renderful.ai/api/v1/account/balance \
-H "Authorization: Bearer sk_your_api_key"APIキーの形式
Renderful APIキーは識別しやすい特定の形式に従っています:
| プレフィックス | 説明 |
|---|---|
| sk_ | Developer API key for dashboard-created server-side integrations |
| vega_ | Legacy developer API key format still accepted for existing integrations |
| rf_ | Agent API key returned by POST /api/v1/agents/register |