Generate studio-quality product images and videos programmatically. Built for AI agents, automation tools, and custom integrations.
The Krev API lets you generate product images, create videos, browse your product catalog, and check your credit balance. All requests use JSON and authenticate via API key.
Responses always include a success boolean. On failure, an error string describes the issue. The machine-readable OpenAPI spec is available at /api/v1/openapi.json.
Every request must include an API key in the Authorization header. Create a key from your Krev dashboard under Settings → API Keys.
Authorization: Bearer sk_live_YOUR_KEY_SECRET
Keep your key secret. The full key is shown only once when created. If compromised, revoke it immediately from the dashboard and create a new one.
/api/v1/images
Generate one or more AI product images. Supports text-to-image and image-to-image with product references. Credits are deducted automatically.
| Parameter | Type | Description |
|---|---|---|
promptrequired | string | Text prompt describing the image to generate. |
aspect_ratio | string | One of "1:1", "16:9", "9:16", "4:3", "3:4".Default: "1:1" |
product_id | uuid | Product ID to use as a reference (from GET /products). |
product_ids | uuid[] | Multiple product IDs for multi-product scenes. |
preset_id | string | Studio preset ID for styling (e.g. flat_lay, lifestyle). |
hd | boolean | Enable 4K upscaling. Costs 2x credits.Default: false |
image_count | integer | Number of variants to generate. One of 1, 2, or 4.Default: 1 |
reference_images | string[] | External image URLs for style reference. |
curl -X POST https://app.krev.ai/api/v1/images \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Premium leather wallet on dark marble surface, studio lighting",
"aspect_ratio": "1:1",
"image_count": 2
}'{
"success": true,
"data": {
"generation_id": "a1b2c3d4-...",
"images": [
"https://app.krev.ai/storage/gen/img_001.webp",
"https://app.krev.ai/storage/gen/img_002.webp"
],
"image_count": 2,
"credits_used": 28
}
}/api/v1/videos
Generate a short product video. A start-frame image is automatically created from your prompt, then animated. Credits are deducted from your account.
| Parameter | Type | Description |
|---|---|---|
promptrequired | string | Text prompt describing the video scene. |
aspect_ratio | string | One of "1:1", "16:9", "9:16", "4:3", "3:4".Default: "16:9" |
duration | integer | Video duration in seconds. 5 or 10.Default: 5 |
product_id | uuid | Product ID for the start frame. |
source_image | string (URL) | External image URL to use as the start frame (skips frame generation). |
preset_id | string | Studio preset ID for styling. |
curl -X POST https://app.krev.ai/api/v1/videos \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Smooth camera pan around sneakers with soft lighting",
"aspect_ratio": "16:9",
"duration": 5
}'{
"success": true,
"data": {
"generation_id": "e5f6g7h8-...",
"video_url": "https://app.krev.ai/storage/gen/vid_001.mp4",
"start_frame_url": "https://app.krev.ai/storage/gen/frame_001.webp",
"duration": 5,
"credits_used": 264
}
}/api/v1/products
Returns all products in your catalog with signed image URLs. Pass an id query param to fetch a single product.
| Parameter | Type | Description |
|---|---|---|
id | uuid | Get a single product by ID. |
limit | integer | Max products to return (max 100).Default: 50 |
curl https://app.krev.ai/api/v1/products?limit=10 \ -H "Authorization: Bearer sk_live_YOUR_KEY"
{
"success": true,
"data": [
{
"id": "d1e2f3a4-...",
"name": "Leather Crossbody Bag",
"image_url": "https://app.krev.ai/storage/products/bag.webp",
"category": "bags",
"metadata": { "color": "tan" },
"created_at": "2026-01-15T10:30:00Z"
}
],
"meta": { "count": 1 }
}/api/v1/generations/{id}
Poll a generation to check its status and retrieve output URLs when complete. Use the generation_id returned from the image or video endpoints.
| Parameter | Type | Description |
|---|---|---|
idrequired | uuid | Generation ID returned from the image or video endpoint. |
| Status | Description |
|---|---|
queued | Waiting to start processing. |
processing | Actively generating. Check progress (0-100). |
succeeded | Complete. Output URLs are available in output. |
failed | Generation failed. Check error for details. |
curl https://app.krev.ai/api/v1/generations/a1b2c3d4-... \ -H "Authorization: Bearer sk_live_YOUR_KEY"
{
"success": true,
"data": {
"id": "a1b2c3d4-...",
"kind": "image",
"status": "succeeded",
"progress": 100,
"output": {
"urls": [
"https://app.krev.ai/storage/gen/img_001.webp"
]
},
"error": null,
"created_at": "2026-02-14T12:00:00Z",
"completed_at": "2026-02-14T12:00:45Z"
}
}/api/v1/credits
Returns your current credit balance, plan info, and storage usage. Useful for checking remaining capacity before queuing generations.
curl https://app.krev.ai/api/v1/credits \ -H "Authorization: Bearer sk_live_YOUR_KEY"
{
"success": true,
"data": {
"plan": "pro",
"plan_name": "Pro",
"credits": {
"current": 1840,
"limit": 2500,
"current_formatted": "1,840",
"limit_formatted": "2,500"
},
"storage": {
"used_bytes": 524288000,
"limit_bytes": 2147483648,
"used_formatted": "500 MB",
"limit_formatted": "2 GB"
},
"resets_at": "2026-03-01T00:00:00Z"
}
}All error responses follow the same shape. The success field is false and an error string describes the issue.
{
"success": false,
"error": "Description of what went wrong"
}| Status | Meaning | Common Cause |
|---|---|---|
400 | Bad Request | Missing or invalid parameters (e.g. no prompt). |
401 | Unauthorized | Missing, invalid, or expired API key. |
402 | Payment Required | Insufficient credits for the requested generation. |
404 | Not Found | Resource not found (e.g. invalid generation ID). |
429 | Too Many Requests | Rate limit exceeded. Wait and retry. |
500 | Server Error | Unexpected internal error. Credits are automatically refunded. |
API calls consume the same credits as the Krev dashboard. Check your balance with GET /credits before generating.
| Operation | Credits | Notes |
|---|---|---|
| Standard image | 14 | Per image. Multiply by image_count. |
| 4K image (hd: true) | 28 | Per image. 2x standard cost. |
| 5-second video | ~264 | Includes start-frame generation (14 cr) + video (~250 cr). |
| 10-second video | ~514 | Includes start-frame generation (14 cr) + video (~500 cr). |
If a generation fails, credits are automatically refunded to your account.
API keys share the same rate limits as your Krev dashboard account. Limits are enforced per-user, not per-key.
When rate-limited, you will receive a 429 response. Wait a few seconds and retry. We recommend implementing exponential backoff in your integration.
Need higher throughput? Contact us at contact@krev.ai for enterprise limits.
Ready to integrate?
Create your API key in the Krev dashboard under Settings → API Keys, or reach out at contact@krev.ai.
Brands on Krev produce studio-quality ads in minutes, not days — cutting production costs by up to 80%.
Get Started· from $19/month