API Documentation
Use your API key to integrate AI image and video generation into your applications. All models use a single unified endpoint.
1. Authorization header (recommended)
Authorization: Bearer YOUR_API_KEY
2. X-API-Key header
X-API-Key: YOUR_API_KEY
Create and manage your API keys in the
type to "image" or "video" and modelId to the model name.POST https://yollomi.com/api/v1/generate
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"type": "image",
"modelId": "flux",
"prompt": "A magical forest with glowing mushrooms",
"aspectRatio": "1:1",
"numOutputs": 1
}Common parameters:
type(required): "image" or "video"modelId(required): Model identifier (see list below)aspectRatio: 1:1, 16:9, 9:16- Other params: prompt, imageUrl, numOutputs, outputFormat, etc.
Response (image):
{ "images": ["https://..."], "remainingCredits": 96 }Response (video):
{ "video": "https://...", "remainingCredits": 91 }Get available models: GET https://yollomi.com/api/v1/models
再開可能な生成リクエスト
新しい生成には新しい Idempotency-Key を使用します。再試行では同じキーと設定を再利用してください。
Prefer: respond-async を送ると保存済みタスクをすぐに取得できます。202 は処理中を示します。
POST /api/v1/generate
Authorization: Bearer YOUR_API_KEY
Idempotency-Key: 87e2af90-40bc-4a61-a190-8a90050e9191
Prefer: respond-async
Content-Type: application/json
{"type":"image","modelId":"flux-schnell","prompt":"A studio product photo"}
HTTP 202
{"jobId":"TASK_UUID","status":"processing","statusUrl":"/api/generation/jobs/TASK_UUID"}
POST /api/generation/jobs/TASK_UUID
Authorization: Bearer YOUR_API_KEY
HTTP 200
{"images":["https://your-media-domain/result.png"],"remainingCredits":8,"jobId":"TASK_UUID"}このヘッダーがない場合は最大3分待機し、未完了なら202を返します。
同じ認証で statusUrl にPOSTするとタスクを進めて確認できます。GETは読み取りのみです。200にはimagesまたはvideoが含まれます。
タスクとキーは完了後90日間保存され、作品は別に保存されます。409 GENERATION_NEEDS_REVIEWの場合は重複送信せずサポートに連絡してください。
yollomi tasks yollomi task TASK_UUID # Reuse a request ID when retrying an interrupted initial submission: YOLLOMI_REQUEST_ID=87e2af90-40bc-4a61-a190-8a90050e9191 yollomi image "A studio product photo"
利用可能なAPIモデル
標準のリクエスト設定で計算した料金です。枚数、品質、時間、解像度、音声、動画入力によって合計が変わります。未提供のモデルは表示しません。
画像モデル · 25
| modelId | 標準クレジット |
|---|---|
flux | 4 · 設定により変動 |
flux-schnell | 2 · 設定により変動 |
remove-bg | 0 |
flux-2-pro | 15 · 設定により変動 |
flux-kontext-pro | 4 |
nano-banana | 4 |
nano-banana-pro | 15 |
nano-banana-2 | 7 |
gpt-image-2 | 25 · 設定により変動 |
gpt-image-2-5-flare | 50 · 設定により変動 |
gpt-image-2-5-sunburst | 50 · 設定により変動 |
z-image-turbo | 1 |
imagen-4-ultra | 6 |
image-4-fast | 3 |
ideogram-v3-turbo | 3 |
stable-diffusion-3-5-large | 7 · 設定により変動 |
seedream-4-5 | 4 |
seedream-5-lite | 4 |
object-remover | 3 |
image-upscaler | 1 |
photo-restoration | 4 |
qwen-image-edit | 3 |
qwen-image-edit-plus | 3 |
virtual-try-on | 3 |
ai-background-generator | 5 |
動画モデル · 16
| modelId | 標準クレジット |
|---|---|
openai-sora-2 | 50 · 設定により変動 |
google-veo-3-1 | 240 · 設定により変動 |
kling-2-1 | 9 |
minimax-hailuo-2-3 | 60 · 設定により変動 |
minimax-hailuo-2-3-fast | 9 |
bytedance-seedance-1-pro-fast | 40 · 設定により変動 |
google-veo-3-fast | 110 · 設定により変動 |
google-veo-3 | 250 · 設定により変動 |
google-veo-3-1-fast | 120 · 設定により変動 |
runway-gen4-turbo | 30 · 設定により変動 |
pixverse-5 | 40 · 設定により変動 |
wan-2-5-i2v | 60 · 設定により変動 |
wan-2-6-i2v | 80 · 設定により変動 |
wan-2-5-t2v | 9 |
wan-2-6-t2v | 29 · 設定により変動 |
kling-v2-6-motion-control | 70 · 設定により変動 |
401 – Invalid or missing API key
402 – Insufficient credits
400 – Invalid request (missing modelId, invalid params)
500 – Server error