API Documentation
Use your API key to integrate AI image and video generation into your applications. All models use a single unified endpoint.
Authentication
All API requests require authentication. Include your API key in one of these ways:
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
Unified Endpoint
Single endpoint for all models. Set
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
Image Models (type: "image")
21 image models, aspectRatio supports 1:1, 16:9, 9:16
| modelId | Credits | Required |
|---|---|---|
| flux | 4/img | prompt |
| flux-schnell | 2/img | prompt |
| flux-2-pro | 15/img | prompt |
| remove-bg | 0 | imageUrl |
| nano-banana | 4 | prompt |
| nano-banana-pro | 15 | prompt |
| flux-kontext-pro | 4 | prompt |
| z-image-turbo | 1 | prompt |
| imagen-4-ultra | 6 | prompt |
| image-4-fast | 3 | prompt |
| ideogram-v3-turbo | 3 | prompt |
| stable-diffusion-3-5-large | 7/img | prompt |
| seedream-4-5 | 4 | prompt |
| object-remover | 3 | image, mask |
| face-swap | 3 | swapImage, inputImage |
| image-upscaler | 1 | imageUrl, scale |
| photo-restoration | 4 | imageUrl |
| qwen-image-edit | 3 | image, prompt |
| qwen-image-edit-plus | 3 | image, prompt |
| virtual-try-on | 3 | clothImage, personImage |
| ai-background-generator | 5 | imageUrl |
Video Models (type: "video")
17 video models, prompt and modelId required, optional inputs
POST https://yollomi.com/api/v1/generate
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"type": "video",
"modelId": "kling-2-1",
"prompt": "A cat walking in the rain",
"inputs": {}
}| modelId | Credits |
|---|---|
| openai-sora-2 | ~50+ |
| google-veo-3 | 10 |
| google-veo-3-fast | 9 |
| google-veo-3-1 | 10 |
| google-veo-3-1-fast | 9 |
| kling-2-1 | 9 |
| kling-v2-6-motion-control | 7/sec |
| minimax-hailuo-2-3 | 9 |
| minimax-hailuo-2-3-fast | 9 |
| runway-gen4-turbo | varies |
| pixverse-5 | 9 |
| wan-2-5-i2v | 9 |
| wan-2-5-t2v | 9 |
| wan-2-6-i2v | 29 |
| wan-2-6-t2v | 29 |
Error Responses
Common HTTP status codes
401 – Invalid or missing API key
402 – Insufficient credits
400 – Invalid request (missing modelId, invalid params)
500 – Server error