Introduction
The adcreator.ai API lets you generate AI product photos and videos, manage credits, upload reference images, and list your generations — all programmatically. It is a standard REST API that returns JSON responses.
Base URL
https://adcreator.ai/api/platform
All endpoints require an API key. You can create and manage keys in your Settings.
Authentication
Authenticate every request by including your API key in the Authorization header as a Bearer token.
Authorization: Bearer sk_live_...
Create API keys in Settings → API Keys. Keys are shown only once at creation — store them securely. Requests without a valid key receive a 401 response.
Credits
/api/platform/creditsRetrieve your current credit balance and lifetime usage stats.
Response
| Field | Type | Description |
|---|---|---|
balance | number | Current available credits |
lifetimePurchased | number | Total credits ever purchased |
lifetimeUsed | number | Total credits ever consumed |
unlimited | boolean | Whether the account has unlimited credits |
{
"balance": 142,
"lifetimePurchased": 500,
"lifetimeUsed": 358,
"unlimited": false
}Models
/api/platform/modelsList all available image generation models and supported aspect ratios. The aspect ratio dimensions returned are based on your subscription tier's resolution level.
Resolution Tiers
Output resolution depends on your plan. Free plans generate at Standard resolution (up to 1024px), Starter plans at HD (up to 1920px), and Pro/Business at Max (up to 2048px). The aspectRatios returned by this endpoint reflect your tier's dimensions. Some models cap resolution below your tier — output will be clamped to the model's maximum.
Response
| Field | Type | Description |
|---|---|---|
models[].id | string | Model identifier to pass to /generate |
models[].displayName | string | Human-readable model name |
models[].creditsCost | number | Credits consumed per image |
models[].estimatedSeconds | number | Approximate generation time |
models[].supportsImageInput | boolean | Whether the model accepts a reference image |
models[].maxWidth | number | Maximum output width in pixels |
models[].maxHeight | number | Maximum output height in pixels |
resolutionTier | string | Your resolution tier: standard, high, or max |
aspectRatios[].id | string | Ratio identifier, e.g. "1:1" |
aspectRatios[].label | string | Display label, e.g. "Square" |
aspectRatios[].width | number | Output width in pixels (based on your resolution tier) |
aspectRatios[].height | number | Output height in pixels (based on your resolution tier) |
{
"models": [
{
"id": "nano-banana-2",
"displayName": "Nano Banana 2",
"creditsCost": 3,
"estimatedSeconds": 8,
"supportsImageInput": true,
"maxWidth": 2048,
"maxHeight": 2048
}
],
"resolutionTier": "max",
"aspectRatios": [
{ "id": "1:1", "label": "Square (1:1)", "width": 2048, "height": 2048 },
{ "id": "16:9", "label": "Landscape (16:9)", "width": 1920, "height": 1080 }
]
}Video Models
/api/platform/video-modelsList all available video generation models, durations, and credit costs.
Response
| Field | Type | Description |
|---|---|---|
models[].id | string | Video model identifier |
models[].displayName | string | Human-readable name |
models[].durations | number[] | Supported durations in seconds |
models[].credits | object | Credits cost per duration (keyed by seconds) |
models[].supportsAudio | boolean | Whether model can generate audio |
models[].supportsNegativePrompt | boolean | Supports negative prompt guidance |
models[].supportsCfgScale | boolean | Supports CFG scale parameter |
Styles
/api/platform/stylesList all available style presets. Pass a style id as the stylePreset parameter when generating an image.
Response
| Field | Type | Description |
|---|---|---|
styles[].id | string | Style preset identifier |
styles[].displayName | string | Human-readable style name |
styles[].category | string | Style category, e.g. "product", "lifestyle" |
styles[].promptSuffix | string | The prompt text appended for this style |
Upload
/api/platform/uploadUpload a reference image to use as input for image generation. Supports multipart/form-data (with a file field) or raw binary with the MIME type as Content-Type. Max file size: 10 MB. Allowed types: PNG, JPEG, WebP.
Response (201 Created)
| Field | Type | Description |
|---|---|---|
path | string | Storage path — pass as inputImagePath to /generate |
publicUrl | string | Public URL of the uploaded image |
curl -X POST https://adcreator.ai/api/platform/upload \ -H "Authorization: Bearer sk_live_..." \ -F "file=@product.jpg"
{
"path": "user_123/1709012345-a1b2c3.jpg",
"publicUrl": "https://...supabase.co/storage/v1/.../product.jpg"
}Generate Image
/api/platform/generateStart an image generation job. Returns immediately with a 202 Accepted status. Poll GET /generations/:id for the result.
Request Body (JSON)
| Field | Type | Description |
|---|---|---|
prompt | string | Generation prompt (3–1000 characters). Required. |
modelId | string | Model ID from /models. Required. |
aspectRatio | string | Aspect ratio from /models, e.g. "1:1". Default: "1:1". |
stylePreset | string | Style ID from /styles. Optional. |
negativePrompt | string | Negative prompt (max 500 chars). Optional. |
inputImagePath | string | Storage path from /upload. Optional. |
batchCount | number | Number of images to generate (1–4). Default: 1. |
Response (202 Accepted)
| Field | Type | Description |
|---|---|---|
id | string | Generation ID for polling |
status | string | "processing" |
curl -X POST https://adcreator.ai/api/platform/generate \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"prompt": "Luxury perfume bottle on marble surface, soft studio lighting",
"modelId": "nano-banana-2",
"aspectRatio": "1:1",
"stylePreset": "studio-product"
}'{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "processing"
}List Generations
/api/platform/generationsRetrieve a paginated list of your image generations.
Query Parameters
| Field | Type | Description |
|---|---|---|
limit | number | Max results to return (default: 50) |
offset | number | Number of results to skip (default: 0) |
Response
Returns an array of generation objects with id, status, prompt, model_id, image_url, created_at, and more.
Get Generation
/api/platform/generations/:idRetrieve a single generation by ID. Use this to poll for completion after starting a generation.
Response
| Field | Type | Description |
|---|---|---|
generation.id | string | Generation UUID |
generation.status | string | "processing", "completed", or "failed" |
generation.prompt | string | The prompt used |
generation.image_url | string | null | Public URL of the generated image (null while processing) |
generation.model_id | string | Model used for generation |
generation.created_at | string | ISO 8601 timestamp |
curl https://adcreator.ai/api/platform/generations/GEN_ID \ -H "Authorization: Bearer sk_live_..."
Delete Generation
/api/platform/generations/:idPermanently delete a generation and its associated image.
Response
| Field | Type | Description |
|---|---|---|
deleted | boolean | true on success |
Generate Video
/api/platform/videosStart a video generation from an existing image generation. Returns 202 Accepted. Poll GET /videos/:id for the result.
Request Body (JSON)
| Field | Type | Description |
|---|---|---|
sourceGenerationId | string (UUID) | ID of an existing image generation. Required. |
prompt | string | Video prompt (3–1000 characters). Required. |
modelId | string | Video model ID from /video-models. Required. |
durationSeconds | number | Duration in seconds (2–15). Required. |
generateAudio | boolean | Generate audio track. Optional. |
negativePrompt | string | Negative prompt (max 2500 chars). Optional. |
cfgScale | number | CFG scale 0–1. Optional. |
movementAmplitude | string | "auto", "small", "medium", or "large". Optional. |
resolution | string | "720p" or "1080p". Optional. |
bgm | boolean | Add background music. Optional. |
Response (202 Accepted)
| Field | Type | Description |
|---|---|---|
id | string | Video generation ID for polling |
status | string | "processing" |
curl -X POST https://adcreator.ai/api/platform/videos \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"sourceGenerationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"prompt": "Smooth camera orbit around the product",
"modelId": "kling-v3-pro",
"durationSeconds": 5
}'Get Video
/api/platform/videos/:idRetrieve a single video generation by ID. Use this to poll for video completion.
Response
| Field | Type | Description |
|---|---|---|
video.id | string | Video generation UUID |
video.status | string | "processing", "completed", or "failed" |
video.video_url | string | null | Public URL of the generated video (null while processing) |
video.model_id | string | Video model used |
video.duration_seconds | number | Requested duration |
video.created_at | string | ISO 8601 timestamp |
curl https://adcreator.ai/api/platform/videos/VIDEO_ID \ -H "Authorization: Bearer sk_live_..."