Image & Video Generation
for AI Agents

Generate images and videos from 40+ AI models with a simple REST API. Built for AI agents, LLMs, and automation pipelines.

TypeScript
// npm install @pixeldojo/sdk
import { PixelDojoClient } from "@pixeldojo/sdk";

const pd = new PixelDojoClient({ apiKey: "pd_your_api_key" });
const job = await pd.generate("flux-1.1-pro", {
  prompt: "A fantasy castle on a cliff at sunset"
});

// → job.assets[0].url

Get started in seconds

Copy the code, swap in your API key, run it.

import { PixelDojoClient } from "@pixeldojo/sdk";

const pd = new PixelDojoClient({ apiKey: "pd_your_api_key" });

// Generate an image and wait for the result
const job = await pd.generate("flux-1.1-pro", {
  prompt: "A fantasy castle on a cliff at sunset",
  aspect_ratio: "16:9",
});

console.log(job.assets[0].url);

Install the SDK

Typed client for Node.js, Deno, Bun, and any JavaScript runtime with fetch.

terminal
npm install @pixeldojo/sdk

Zero dependencies

Uses native fetch. No axios, no node-fetch.

Full type coverage

Every method, response, and error is typed.

ESM + CJS

Dual-format build. Works everywhere.

@pixeldojo/sdk on npm · No SDK? Use the REST API directly with any HTTP client.

Built for automation

Every detail is designed for machines that call APIs, not humans clicking buttons.

40+ AI Models

Image generation, video generation, upscaling, and editing — all from one API.

Async by Default

Submit a job, get a job ID. Poll the status URL or register a webhook.

Per-Model Schemas

Every model has a JSON schema endpoint. Your agent knows the exact request shape before calling.

No Browser Needed

Pure REST API. No UI scraping, no headless browser, no screenshots.

Credit-Based Pricing

Pay per generation with credits. No subscription required to use the API.

LLM Discovery

llm.txt, OpenAPI 3.1 spec, and AI plugin manifest for zero-config agent integration.

How it works

Three API calls. Schema in, image out.

1

Pick a model

List models or fetch the schema for a specific one.

GET /api/v1/models/flux-1.1-pro/schema

{
  "apiId": "flux-1.1-pro",
  "name": "Flux 1.1 Pro",
  "inputSchema": {
    "prompt": { "type": "string", "required": true },
    "aspect_ratio": { "type": "string", "default": "1:1" },
    "raw": { "type": "boolean", "default": false }
  }
}
2

Submit a job

POST with the prompt and parameters. You get a job ID back instantly.

POST /api/v1/models/flux-1.1-pro/run
{
  "prompt": "A fantasy castle on a cliff at sunset",
  "aspect_ratio": "16:9"
}

→ {
  "jobId": "job_abc123",
  "statusUrl": "https://pixeldojo.ai/api/v1/jobs/job_abc123",
  "status": "processing"
}
3

Get the result

Poll the status URL. When complete, grab the output URL.

GET /api/v1/jobs/job_abc123

{
  "status": "completed",
  "output": {
    "images": [
      "https://pixeldojo-prod.s3.amazonaws.com/generations/abc123.png"
    ]
  },
  "creditCost": 1,
  "model": "flux-1.1-pro"
}

Endpoint reference

MethodEndpointDescription
GET/api/v1/modelsList all available models
GET/api/v1/models/{apiId}/schemaGet the JSON schema for a model
POST/api/v1/models/{apiId}/runSubmit a generation job
GET/api/v1/jobs/{jobId}Check job status and get output URLs
POST/api/v1/jobs/{jobId}/webhookRegister a webhook for completion

Full reference: API Documentation · OpenAPI Spec · llm.txt

36+ models, one API

Same endpoint pattern for every model. Your agent picks the model, we handle the rest.

Flux Dev example
image

Flux Dev

1 credit
ImageLoRA

High-quality development model with configurable steps, guidance, and LoRA support.

/models/flux-dev/run
Flux Krea Dev example
image

Flux Krea Dev

1 credit
ImageLoRA

Photorealistic generation that avoids the oversaturated AI look. LoRA compatible.

/models/flux-krea-dev/run
Flux 1.1 Pro example
image

Flux 1.1 Pro

1 credit
Image

Latest pro model with enhanced quality and strong prompt adherence.

/models/flux-1.1-pro/run
Flux 1.1 Pro Ultra example
image

Flux 1.1 Pro Ultra

1.5 credits
Image

Highest quality Flux model with raw mode for natural-looking images.

/models/flux-1.1-pro-ultra/run
Flux Kontext Pro example
image

Flux Kontext Pro

1 credit
ImageEditing

Advanced model with state-of-the-art performance for both generation and editing.

/models/flux-kontext-pro/run
Flux Kontext Max example
image

Flux Kontext Max

2 credits
ImageEditing

Premium model with maximum performance and improved typography for generation and editing.

/models/flux-kontext-max/run
Flux 2 Flex example
image

Flux 2 Flex

1.5 credits
ImageLoRAEditing

Max-quality with up to 10 reference images

/models/flux-2-flex/run
Flux 2 Klein 4B example
image

Flux 2 Klein 4B

0.1 credits
ImageLoRAEditing

Very fast generation and editing with up to 5 reference images

/models/flux-2-klein-4b/run
WAN 2.6 Flash video example
video

WAN 2.6 Flash

1 credits/sec
VideoAudio

Fast and affordable image-to-video

/models/wan-2.6-flash/run
WAN 2.2 Plus video example
video

WAN 2.2 Plus

10 credits
VideoLoRA

Official Alibaba model with 1080p support

/models/wan-2.2-plus/run
Seedance 1.5 video example
video

Seedance 1.5

1.5 credits/sec
VideoAudio

ByteDance Seedance 1.5 video generation with native audio, dance motion, 480p/720p resolution, and up to 12 seconds duration

/models/seedance-1.5/run
xAI Video video example
video

xAI Video

2 credits/sec
Video

xAI video generation via Replicate with text-to-video and image-to-video support

/models/xai-video/run

Works with your agent

Any agent that can make HTTP requests works with PixelDojo.

OpenClaw / ClawHub

Install the skill directly from ClawHub and your agent gains structured tool access to every PixelDojo model.

MCP & Chat Agents

Any MCP-compatible agent, chat assistant, or orchestrator can call the same REST endpoints.

Automation & Workflows

Wire image and video generation into pipelines with async polling or webhook callbacks.

Works with Claude, OpenClaw, LangChain, AutoGPT, custom MCP servers, n8n, Zapier, and any HTTP client.

Start generating

Get an API key, top up credits, and generate your first image in under a minute.