Skip to main content

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

126+ models, one API

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

Change Camera Angle example
image

Change Camera Angle

1 credit
Image

Camera-aware editing via fal.ai Qwen Image Edit 2511 with multi-angle LoRA — 360° orbit, tilt, and zoom.

/models/change-camera-angle/run
Consistent Characters example
image

Consistent Characters

1 credit
Image

Generate consistent character variations with FLUX Kontext, Nano Banana Pro/2, Flux 2 Dev, or Qwen Image 2 Pro.

/models/consistent-characters/run
Creative Upscale example
image

Creative Upscale

0.5 credits
Image

Clarity Upscaler (creative upscale) via Replicate — boost detail with stable-diffusion refinement.

/models/creative-upscale/run
Dreamina 3.1 example
image

Dreamina 3.1

1 credit
Image

ByteDance Dreamina 3.1 — 4MP cinematic text-to-image with precise style control.

/models/dreamina/run
Ernie example
image

Ernie

1 credit
Image

Baidu Ernie text-to-image (fal.ai). Multilingual prompts and built-in prompt expansion.

/models/ernie/run
FLUX example
image

FLUX

1 credit
Image

FLUX family on Replicate — Schnell, Dev, Pro, Kontext, Ultra, and LoRA remix variants in one entrypoint.

/models/flux/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
Grok Imagine R2V video example
video

Grok Imagine R2V

10 credits
Video

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/run
Grok Video Extend video example
video

Grok Video Extend

12 credits
Video

xAI Grok Imagine video extension — continue an existing MP4 with a prompt-directed extension (2–10s).

/models/grok-video-extend/run
Hailuo Standard video example
video

Hailuo Standard

8 credits
Video

Premium quality text-to-video and image-to-video

/models/hailuo-standard/run
Hailuo Fast video example
video

Hailuo Fast

4 credits
Video

Fast image-to-video generation

/models/hailuo-fast/run
Heygen Avatar video example
video

Heygen Avatar

120 credits
VideoAudio

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/run
Kling Motion Control v3 Standard video example
video

Kling Motion Control v3 Standard

3 credits/sec
VideoAudio

Kling Video v3 Standard motion control endpoint

/models/kling-motion-control/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.