Get Started
API Reference

Krev API

Generate studio-quality product images and videos programmatically. Built for AI agents, automation tools, and custom integrations.

Base URLhttps://app.krev.ai/api/v1
v1.0

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.

Authentication

Every request must include an API key in the Authorization header. Create a key from your Krev dashboard under Settings → API Keys.

Authorization Header
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.

POST

Generate Images

/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.

Request Body

ParameterTypeDescription
promptrequiredstringText prompt describing the image to generate.
aspect_ratiostringOne of "1:1", "16:9", "9:16", "4:3", "3:4".Default: "1:1"
product_iduuidProduct ID to use as a reference (from GET /products).
product_idsuuid[]Multiple product IDs for multi-product scenes.
preset_idstringStudio preset ID for styling (e.g. flat_lay, lifestyle).
hdbooleanEnable 4K upscaling. Costs 2x credits.Default: false
image_countintegerNumber of variants to generate. One of 1, 2, or 4.Default: 1
reference_imagesstring[]External image URLs for style reference.

Example Request

cURL
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
  }'

Example Response

200 OK
{
  "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
  }
}
POST

Generate Video

/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.

Request Body

ParameterTypeDescription
promptrequiredstringText prompt describing the video scene.
aspect_ratiostringOne of "1:1", "16:9", "9:16", "4:3", "3:4".Default: "16:9"
durationintegerVideo duration in seconds. 5 or 10.Default: 5
product_iduuidProduct ID for the start frame.
source_imagestring (URL)External image URL to use as the start frame (skips frame generation).
preset_idstringStudio preset ID for styling.

Example Request

cURL
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
  }'

Example Response

200 OK
{
  "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
  }
}
GET

List Products

/api/v1/products

Returns all products in your catalog with signed image URLs. Pass an id query param to fetch a single product.

Query Parameters

ParameterTypeDescription
iduuidGet a single product by ID.
limitintegerMax products to return (max 100).Default: 50

Example Request

cURL
curl https://app.krev.ai/api/v1/products?limit=10 \
  -H "Authorization: Bearer sk_live_YOUR_KEY"

Example Response

200 OK
{
  "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 }
}
GET

Generation Status

/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.

Path Parameters

ParameterTypeDescription
idrequireduuidGeneration ID returned from the image or video endpoint.

Status Values

StatusDescription
queuedWaiting to start processing.
processingActively generating. Check progress (0-100).
succeededComplete. Output URLs are available in output.
failedGeneration failed. Check error for details.

Example Request

cURL
curl https://app.krev.ai/api/v1/generations/a1b2c3d4-... \
  -H "Authorization: Bearer sk_live_YOUR_KEY"

Example Response

200 OK
{
  "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"
  }
}
GET

Check Credits

/api/v1/credits

Returns your current credit balance, plan info, and storage usage. Useful for checking remaining capacity before queuing generations.

Example Request

cURL
curl https://app.krev.ai/api/v1/credits \
  -H "Authorization: Bearer sk_live_YOUR_KEY"

Example Response

200 OK
{
  "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"
  }
}

Error Codes

All error responses follow the same shape. The success field is false and an error string describes the issue.

Error Response Shape
{
  "success": false,
  "error": "Description of what went wrong"
}
StatusMeaningCommon Cause
400Bad RequestMissing or invalid parameters (e.g. no prompt).
401UnauthorizedMissing, invalid, or expired API key.
402Payment RequiredInsufficient credits for the requested generation.
404Not FoundResource not found (e.g. invalid generation ID).
429Too Many RequestsRate limit exceeded. Wait and retry.
500Server ErrorUnexpected internal error. Credits are automatically refunded.

Credit Costs

API calls consume the same credits as the Krev dashboard. Check your balance with GET /credits before generating.

OperationCreditsNotes
Standard image14Per image. Multiply by image_count.
4K image (hd: true)28Per image. 2x standard cost.
5-second video~264Includes start-frame generation (14 cr) + video (~250 cr).
10-second video~514Includes start-frame generation (14 cr) + video (~500 cr).

If a generation fails, credits are automatically refunded to your account.

Rate Limits

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.

Ship 10x More Creatives. Spend 90% Less.

Brands on Krev produce studio-quality ads in minutes, not days — cutting production costs by up to 80%.

Get Started· from $19/month