Skip to main content

PixelDojo API Reference

Agent-first async REST API for AI image and video generation. 63 models currently available.

Onboarding path: create an API key, buy credits, discover a model, fetch its schema, submit a job, then poll or use webhooks. No subscription is required for API access.

Overview

Base URL
https://pixeldojo.ai/api/v1
Auth
Authorization: Bearer YOUR_API_KEY
Format
JSON request/response
Pattern
Async jobs: discover schema, submit via POST, poll via GET, replay webhooks when needed
Models
63 enabled (37 image, 26 video)

Authentication

All API requests require an API key sent as a Bearer token in the Authorization header. API keys are available to signed-in accounts, and usage is billed against prepaid credits.

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Create API keys at /api-platform/api-keys. API access does not require a subscription. Buy credits at /api-platform/buy-credits.

Endpoints

GET/api/v1/models

Public discovery endpoint for all enabled image and video models.

Example Request:

curl "https://pixeldojo.ai/api/v1/models?detailed=true"

Example Response:

{
  "models": [
    {
      "apiId": "flux-1.1-pro",
      "name": "Flux 1.1 Pro",
      "description": "High-quality image generation with strong prompt adherence.",
      "modality": "image",
      "creditCost": {
        "default": 1,
        "type": "fixed",
        "amount": 1
      }
    }
  ],
  "total": 42,
  "imageCount": 25,
  "videoCount": 17
}
GET/api/v1/models/{apiId}

Fetch model capabilities, parameters, and the canonical request schema for one model.

Example Request:

curl "https://pixeldojo.ai/api/v1/models/flux-1.1-pro"

Example Response:

{
  "apiId": "flux-1.1-pro",
  "name": "Flux 1.1 Pro",
  "modality": "image",
  "requestSchema": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "prompt"
    ],
    "properties": {
      "prompt": {
        "type": "string",
        "description": "Text prompt"
      }
    }
  },
  "endpoints": {
    "run": "/api/v1/models/flux-1.1-pro/run",
    "schema": "/api/v1/models/flux-1.1-pro/schema"
  }
}
GET/api/v1/models/{apiId}/schema

Return the model request schema as JSON so agents and SDKs can build valid payloads.

Example Request:

curl "https://pixeldojo.ai/api/v1/models/flux-1.1-pro/schema"

Example Response:

{
  "apiId": "flux-1.1-pro",
  "name": "Flux 1.1 Pro",
  "modality": "image",
  "schema": {
    "title": "Flux 1.1 ProRequest",
    "type": "object",
    "additionalProperties": false,
    "required": [
      "prompt"
    ],
    "properties": {
      "prompt": {
        "type": "string",
        "description": "Text prompt"
      }
    }
  }
}
POST/api/v1/models/{apiId}/run

Submit an async job for any image or video model. Match the request body to the schema from /models/{apiId}/schema.

Example Request:

curl -X POST "https://pixeldojo.ai/api/v1/models/flux-1.1-pro/run" -H "Authorization: Bearer YOUR_API_KEY" -d '{"prompt": "A sunset", "aspect_ratio": "1:1"}'

Example Response:

{
  "jobId": "job_abc123",
  "status": "pending",
  "statusUrl": "https://pixeldojo.ai/api/v1/jobs/job_abc123",
  "creditCost": 1,
  "creditsRemaining": 99
}
GET/api/v1/jobs

List recent jobs for the authenticated API key owner with optional filters.

Example Request:

curl "https://pixeldojo.ai/api/v1/jobs?limit=10&status=completed" -H "Authorization: Bearer YOUR_API_KEY"

Example Response:

{
  "jobs": [
    {
      "jobId": "job_abc123",
      "apiId": "flux-1.1-pro",
      "status": "completed",
      "creditCost": 1,
      "refunded": false,
      "assets": [
        {
          "assetId": "job_abc123:image:0",
          "kind": "image",
          "url": "https://temp.pixeldojo.ai/...png",
          "apiId": "flux-1.1-pro",
          "jobId": "job_abc123",
          "expiresAt": "2026-03-17T12:00:00.000Z"
        }
      ],
      "webhook": {
        "configured": true,
        "delivered": true,
        "attempts": 1
      },
      "createdAt": "2026-03-17T11:59:00.000Z",
      "updatedAt": "2026-03-17T12:00:00.000Z",
      "expiresAt": "2026-03-18T12:00:00.000Z"
    }
  ],
  "total": 1,
  "filters": {
    "limit": 10,
    "status": "completed"
  }
}
GET/api/v1/jobs/{jobId}

Check job status and retrieve outputs, asset references, and webhook delivery state when complete.

Example Request:

curl "https://pixeldojo.ai/api/v1/jobs/job_abc123" -H "Authorization: Bearer YOUR_API_KEY"

Example Response:

{
  "jobId": "job_abc123",
  "apiId": "flux-1.1-pro",
  "status": "completed",
  "creditCost": 1,
  "refunded": false,
  "output": {
    "images": [
      "https://temp.pixeldojo.ai/...png"
    ]
  },
  "assets": [
    {
      "assetId": "job_abc123:image:0",
      "kind": "image",
      "url": "https://temp.pixeldojo.ai/...png",
      "apiId": "flux-1.1-pro",
      "jobId": "job_abc123",
      "expiresAt": "2025-01-23T12:00:00Z"
    }
  ],
  "webhook": {
    "configured": true,
    "url": "https://example.com/webhook",
    "delivered": true,
    "attempts": 1
  },
  "createdAt": "2025-01-23T11:58:00Z",
  "updatedAt": "2025-01-23T12:00:00Z",
  "expiresAt": "2025-01-23T12:00:00Z"
}
GET/api/v1/jobs/{jobId}/webhook

Inspect webhook configuration and delivery status for a job.

Example Request:

curl "https://pixeldojo.ai/api/v1/jobs/job_abc123/webhook" -H "Authorization: Bearer YOUR_API_KEY"

Example Response:

{
  "jobId": "job_abc123",
  "apiId": "flux-1.1-pro",
  "status": "completed",
  "webhook": {
    "configured": true,
    "url": "https://example.com/webhook",
    "delivered": true,
    "attempts": 1
  }
}
POST/api/v1/jobs/{jobId}/webhook

Redeliver the terminal webhook for a completed or failed job.

Example Request:

curl -X POST "https://pixeldojo.ai/api/v1/jobs/job_abc123/webhook" -H "Authorization: Bearer YOUR_API_KEY"

Example Response:

{
  "replayed": true,
  "job": {
    "jobId": "job_abc123",
    "apiId": "flux-1.1-pro",
    "status": "completed",
    "webhook": {
      "configured": true,
      "delivered": true,
      "attempts": 2
    }
  }
}

Available Models (63)

Also available programmatically: GET https://pixeldojo.ai/api/v1/models. This list updates automatically when models are enabled or disabled.

For any single model, fetch GET https://pixeldojo.ai/api/v1/models/{apiId}/schema to retrieve the canonical request schema before submitting a job.

Image Models (37)

Model IDNameCreditsDescription
flux-devFlux Dev1High-quality development model with configurable steps, guidance, and LoRA support.
flux-krea-devFlux Krea Dev1Photorealistic generation that avoids the oversaturated AI look. LoRA compatible.
flux-1.1-proFlux 1.1 Pro1Latest pro model with enhanced quality and strong prompt adherence.
flux-1.1-pro-ultraFlux 1.1 Pro Ultra1.5Highest quality Flux model with raw mode for natural-looking images.
flux-kontext-proFlux Kontext Pro1Advanced model with state-of-the-art performance for both generation and editing.
flux-kontext-maxFlux Kontext Max2Premium model with maximum performance and improved typography for generation and editing.
flux-2-flexFlux 2 Flex1.5Max-quality with up to 10 reference images
flux-2-klein-4bFlux 2 Klein 4B0.1Very fast generation and editing with up to 5 reference images
flux-2-klein-9bFlux 2 Klein 9B0.54-step distilled FLUX.2 [klein] foundation model for flexible control
flux-2-proFlux 2 Pro1.5High-quality with up to 8 reference images
flux-2-maxFlux 2 Max2The highest fidelity image model from Black Forest Labs
flux-2-devFlux 2 Dev1Fast quality with up to 4 reference images
seedream-4Seedream 4.51ByteDance Seedream 4.5 - New-generation image creation with superior aesthetics, text rendering, and up to 4K resolution
seedream-5-liteSeedream 5 Lite1ByteDance Seedream 5.0 Lite - fast, high-quality image generation and editing with strong aesthetics and text rendering
ponyxl-ponyrealism-v23Pony Realism1Pony Realism - Stylized anime generation
ponyxl-tponynai3-v7Pony NAI1Pony NAI - Stylized anime generation
ponyxl-waianinsfwponyxl-v140Wai ANI1Wai ANI - Stylized anime generation
qwen-image-plusQWEN Image Plus1Fast generation with excellent quality
qwen-image-maxQWEN Image Max2Highest quality output
qwen-image-2.0QWEN Image 2.01Fast, balanced image generation and editing
qwen-image-2.0-proQWEN Image 2.0 Pro2Enhanced text rendering, realistic textures, and semantic adherence
wan-imageWAN 2.2 Image1Fast cinematic image generation (3-6 seconds) with up to 4MP output and optional LoRA support
wan-2.6-imageWAN 2.6 Image1Alibaba WAN 2.6 high-quality AI image generation with prompt enhancement and up to 2MP output
wan-2.7-imageWAN 2.7 Standard1Faster Wan 2.7 image generation and editing
wan-2.7-image-proWAN 2.7 Pro2Higher quality Wan 2.7 tier with 4K support for text-to-image
z-image-turboZ Image Turbo0.5Super fast 6B parameter photorealistic image generation with excellent text rendering and LoRA support
p-imageP-Image1Sub-second text-to-image generation with exceptional text rendering and prompt adherence
imagineartImagineArt 1.5 Pro1.5Advanced text-to-image model generating ultra-high-fidelity 4K visuals with lifelike realism and refined aesthetics
gemini-flashGoogle Gemini Flash1Fast generation with Gemini 2.5 Flash
nano-banana-proGoogle Nano Banana Pro3SOTA with accurate typography and reasoning
nano-banana-2Google Nano Banana 23Next-generation SOTA model with stronger consistency
gpt-image-lowGPT-Image 1.5 Low1Fast, lower detail generation
gpt-image-mediumGPT-Image 1.5 Medium1Balanced quality and speed
gpt-image-highGPT-Image 1.5 High4Maximum detail and quality
kling-imageKling Image V31Kling Image V3 text-to-image generation with optional image edits and flexible aspect ratios
xai-imageGrok Imagine Image1Grok Imagine Image via Replicate for text-to-image and single-image edits
dreaminaDreamina 3.11ByteDance 4MP cinematic image generation with enhanced quality, precise style control, and commercial design optimization

Video Models (26)

Model IDNameCreditsDescription
kling-video-v3-standard-textKling Video v3 Standard (Text)6/secStandard text-to-video with native audio
kling-video-v3-standard-imageKling Video v3 Standard (Image)6/secStandard image-to-video with native audio
kling-video-v3-pro-textKling Video v3 Pro (Text)8/secPro text-to-video with cinematic quality and native audio
kling-video-v3-pro-imageKling Video v3 Pro (Image)8/secPro image-to-video with cinematic quality and native audio
kling-motion-controlKling Motion Control v3 Standard3/secKling Video v3 Standard motion control endpoint
wan-2.6-standardWAN 2.6 Standard2.5/secHigher quality, 720p/1080p support
wan-2.6-flashWAN 2.6 Flash1/secFast and affordable image-to-video
wan-2.7-t2vWAN 2.7 Text-to-Video2.5/secText-to-video with audio sync, 720p/1080p output, and 2-15 second durations
wan-2.7-i2vWAN 2.7 Image-to-Video2.5/secImage-to-video and video continuation with optional last-frame control and audio sync
wan-2.2-standardWAN 2.2 Standard3Premium quality with enhanced detail
wan-2.2-plusWAN 2.2 Plus10Official Alibaba model with 1080p support
wan-2.2-extendedWAN 2.2 Extended1.2/secfal.ai WAN 2.2 with up to 10-second videos and dual LoRA support
hailuo-standardHailuo Standard8Premium quality text-to-video and image-to-video
hailuo-fastHailuo Fast4Fast image-to-video generation
veo-3.1-fastVEO 3.1 Fast3/secFaster generation at 3 credits per second
veo-3.1-standardVEO 3.1 Standard8/secHigher quality at 8 credits per second
veo-3.1-liteVEO 3.1 Lite1.5/secRunware-powered Lite variant at 1.5 credits/sec for 720p and 2 credits/sec for 1080p. No reference images, no audio generation, no 1:1 aspect ratio.
seedance-1.5Seedance 1.51.5/secByteDance Seedance 1.5 video generation with native audio, dance motion, 480p/720p resolution, and up to 12 seconds duration
p-videoP Video0.5/secPruna AI video generation with text/image input, optional audio conditioning, draft mode, and 720p/1080p outputs.
heygen-avatarHeygen Avatar2/secGenerate a talking avatar video from a portrait image and script using Heygen Avatar 4 on fal.ai.
xai-videoGrok Imagine Video2/secGrok Imagine video generation with text-to-video and image-to-video support
ltx-2-fast-t2vLTX 2.3 Fast Text-to-Video2/secFast text-to-video generation (6-20s, 1080p-2160p).
ltx-2-fast-i2vLTX 2.3 Fast Image-to-Video2/secFast image-to-video generation (6-20s, 1080p-2160p).
ltx-2-pro-t2vLTX 2.3 Pro Text-to-Video2/secHigher quality text-to-video generation (6-10s, 1080p-2160p).
ltx-2-pro-i2vLTX 2.3 Pro Image-to-Video2/secHigher quality image-to-video generation (6-10s, 1080p-2160p).
ltx-2-pro-extendLTX 2.3 Pro Extend Video2/secExtend an existing video clip from the start or end (1-20s, Pro tier only).

Response Format

Submit Response (202)

{
  "jobId": "job_abc123",
  "status": "pending",
  "statusUrl": "https://pixeldojo.ai/api/v1/jobs/job_abc123",
  "creditCost": 1,
  "creditsRemaining": 99
}

Completed Response (200)

{
  "jobId": "job_abc123",
  "apiId": "flux-1.1-pro",
  "status": "completed",
  "output": {
    "images": [
      "https://temp.pixeldojo.ai/pixeldojotemp/...png"
    ]
  },
  "assets": [
    {
      "assetId": "job_abc123:image:0",
      "kind": "image",
      "url": "https://temp.pixeldojo.ai/pixeldojotemp/...png"
    }
  ],
  "webhook": {
    "configured": true,
    "delivered": true,
    "attempts": 1
  },
  "creditCost": 1,
  "refunded": false,
  "createdAt": "2026-03-17T11:59:00Z",
  "updatedAt": "2026-03-17T12:00:00Z",
  "expiresAt": "2026-02-07T12:00:00Z"
}

Job Statuses

Control Plane

PixelDojo exposes agent-friendly control-plane routes for inspecting request schemas, listing recent jobs, and replaying terminal webhooks.

Installable Surfaces

PixelDojo is designed to be consumable by different kinds of agent runtimes. Use the surface that best matches your stack:

Error Codes

CodeHTTP StatusDescription
unauthorized401Missing or invalid API key
invalid_json400Invalid JSON in request body
validation_error400Input validation failed
not_found404Model or job not found
insufficient_credits402Insufficient credits
credit_error500Failed to deduct credits
submission_failed500Failed to submit job
expired410Job has expired
rate_limit_exceeded429Rate limit exceeded
internal_error500Internal server error

Code Examples

cURL

# Submit a job
curl -X POST "https://pixeldojo.ai/api/v1/models/flux-1.1-pro/run" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "A sunset", "aspect_ratio": "1:1", "webhook_url": "https://example.com/webhook"}'

# Poll for results
curl "https://pixeldojo.ai/api/v1/jobs/job_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"

# List recent jobs
curl "https://pixeldojo.ai/api/v1/jobs?limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Replay a terminal webhook
curl -X POST "https://pixeldojo.ai/api/v1/jobs/job_abc123/webhook" \
  -H "Authorization: Bearer YOUR_API_KEY"

Python

import requests
import time

API_KEY = "your_api_key"
BASE_URL = "https://pixeldojo.ai/api/v1"

model_schema = requests.get(
  f"{BASE_URL}/models/flux-1.1-pro/schema"
).json()

submit_response = requests.post(
  f"{BASE_URL}/models/flux-1.1-pro/run",
  headers={
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json",
  },
  json={"prompt": "A sunset", "aspect_ratio": "1:1", "webhook_url": "https://example.com/webhook"},
)
job = submit_response.json()

while True:
  status = requests.get(
    job["statusUrl"],
    headers={"Authorization": f"Bearer {API_KEY}"}
  ).json()
  if status["status"] in {"completed", "failed"}:
    print(status)
    break
  time.sleep(2)

JavaScript

const schema = await fetch("https://pixeldojo.ai/api/v1/models/flux-1.1-pro/schema");
const requestSchema = await schema.json();

const submit = await fetch("https://pixeldojo.ai/api/v1/models/flux-1.1-pro/run", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    prompt: "A sunset",
    aspect_ratio: "1:1",
    webhook_url: "https://example.com/webhook"
  })
});

const job = await submit.json();
let result;

do {
  const status = await fetch(job.statusUrl, {
    headers: { "Authorization": "Bearer YOUR_API_KEY" }
  });
  result = await status.json();
  if (result.status === "pending" || result.status === "processing") {
    await new Promise((resolve) => setTimeout(resolve, 2000));
  }
} while (result.status === "pending" || result.status === "processing");

console.log(requestSchema.schema, result.assets, result.webhook);

TypeScript

interface JobSubmitResponse {
  jobId: string;
  status: "pending" | "processing";
  statusUrl: string;
  creditCost: number;
  creditsRemaining: number;
  expiresAt: string;
}

interface JobAsset {
  assetId: string;
  kind: "image" | "video";
  url: string;
}

interface JobResult {
  jobId: string;
  apiId: string;
  status: "pending" | "processing" | "completed" | "failed";
  assets: JobAsset[];
  webhook: { configured: boolean; delivered: boolean; attempts: number };
  output?: { images?: string[]; video?: string };
  error?: string;
}

const submit = await fetch("https://pixeldojo.ai/api/v1/models/flux-1.1-pro/run", {
  method: "POST",
  headers: { 
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    prompt: "A sunset",
    aspect_ratio: "1:1",
    webhook_url: "https://example.com/webhook"
  })
});

const job: JobSubmitResponse = await submit.json();
const resultResponse = await fetch(job.statusUrl, {
  headers: { "Authorization": "Bearer YOUR_API_KEY" }
});
const result: JobResult = await resultResponse.json();

if (result.status === "completed") {
  console.log(result.assets);
}

Rate Limits

60 requests per minute across all endpoints.

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
X-RateLimit-Reset: 1738800000

Best Practices

  1. Store API keys securely — never in client-side code or public repos
  2. Fetch /models/{apiId}/schema before generating dynamic payloads for a model
  3. Poll job status with exponential backoff (start at 2s, max 30s)
  4. Use asset references from job responses to track outputs across retries and orchestration steps
  5. Download outputs promptly — generated content expires after 24 hours
  6. Use seed for reproducible results across identical prompts
  7. Use webhook_url instead of polling for production workloads
  8. Handle rate limits gracefully with retry logic