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.
// 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].urlGet 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.
npm install @pixeldojo/sdkZero 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.
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 }
}
}
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"
}
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
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/models | List all available models |
GET | /api/v1/models/{apiId}/schema | Get the JSON schema for a model |
POST | /api/v1/models/{apiId}/run | Submit a generation job |
GET | /api/v1/jobs/{jobId} | Check job status and get output URLs |
POST | /api/v1/jobs/{jobId}/webhook | Register a webhook for completion |
Full reference: API Documentation · OpenAPI Spec · llm.txt
126+ models, one API
Same endpoint pattern for every model. Your agent picks the model, we handle the rest.
Change Camera Angle
Camera-aware editing via fal.ai Qwen Image Edit 2511 with multi-angle LoRA — 360° orbit, tilt, and zoom.
/models/change-camera-angle/runConsistent Characters
Generate consistent character variations with FLUX Kontext, Nano Banana Pro/2, Flux 2 Dev, or Qwen Image 2 Pro.
/models/consistent-characters/runCreative Upscale
Clarity Upscaler (creative upscale) via Replicate — boost detail with stable-diffusion refinement.
/models/creative-upscale/runDreamina 3.1
ByteDance Dreamina 3.1 — 4MP cinematic text-to-image with precise style control.
/models/dreamina/runErnie
Baidu Ernie text-to-image (fal.ai). Multilingual prompts and built-in prompt expansion.
/models/ernie/runFLUX
FLUX family on Replicate — Schnell, Dev, Pro, Kontext, Ultra, and LoRA remix variants in one entrypoint.
/models/flux/runFlux 2 Flex
Max-quality with up to 10 reference images
/models/flux-2-flex/runFlux 2 Klein 4B
Very fast generation and editing with up to 5 reference images
/models/flux-2-klein-4b/runGrok Imagine R2V
xAI Grok Imagine reference-to-video via Replicate — 1–7 reference images plus prompt for 1–10s clips at 480p or 720p.
/models/grok-r2v/runGrok Video Extend
xAI Grok Imagine video extension — continue an existing MP4 with a prompt-directed extension (2–10s).
/models/grok-video-extend/runHailuo Standard
Premium quality text-to-video and image-to-video
/models/hailuo-standard/runHailuo Fast
Fast image-to-video generation
/models/hailuo-fast/runHeygen Avatar
Heygen Avatar 4 via fal.ai — animate a portrait with prompt-driven speech or an audio track, with optional background and captions.
/models/heygen-avatar/runKling Motion Control v3 Standard
Kling Video v3 Standard motion control endpoint
/models/kling-motion-control/runWorks 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.