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
36+ models, one API
Same endpoint pattern for every model. Your agent picks the model, we handle the rest.
Flux Dev
High-quality development model with configurable steps, guidance, and LoRA support.
/models/flux-dev/runFlux Krea Dev
Photorealistic generation that avoids the oversaturated AI look. LoRA compatible.
/models/flux-krea-dev/runFlux 1.1 Pro
Latest pro model with enhanced quality and strong prompt adherence.
/models/flux-1.1-pro/runFlux 1.1 Pro Ultra
Highest quality Flux model with raw mode for natural-looking images.
/models/flux-1.1-pro-ultra/runFlux Kontext Pro
Advanced model with state-of-the-art performance for both generation and editing.
/models/flux-kontext-pro/runFlux Kontext Max
Premium model with maximum performance and improved typography for generation and editing.
/models/flux-kontext-max/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/runWAN 2.6 Flash
Fast and affordable image-to-video
/models/wan-2.6-flash/runWAN 2.2 Plus
Official Alibaba model with 1080p support
/models/wan-2.2-plus/runSeedance 1.5
ByteDance Seedance 1.5 video generation with native audio, dance motion, 480p/720p resolution, and up to 12 seconds duration
/models/seedance-1.5/runxAI Video
xAI video generation via Replicate with text-to-video and image-to-video support
/models/xai-video/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.