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

134+ models, one API

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

Background Remover example
image

Background Remover

0 credits
Image

Remove backgrounds from images via lucataco/remove-bg on Replicate.

/models/background-remover/run
Change Camera Angle example
image

Change Camera Angle

0 credits
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

0 credits
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

0 credits
Image

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

/models/ernie/run
Face Enhance example
image

Face Enhance

0 credits
Image

Crystal Upscaler via Replicate — face-detail preserving upscale, cost scales with output megapixels.

/models/face-enhance/run
FLUX example
image

FLUX

0 credits
Image

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

/models/flux/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

0 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 Reference to Video video example
video

Kling Reference to Video

0 credits
Video

Kling O3 reference-driven video generation — image or video references, Standard or Pro tier.

/models/kling-reference-to-video/run
Kling 2.6 Pro video example
video

Kling 2.6 Pro

0 credits
Video

Kling Video v2.6 Pro (fal.ai) — text-to-video or image-to-video, 5 or 10 seconds, with audio generation.

/models/kling-v2-6/run
Kling Video v3 Standard (Text) video example
video

Kling Video v3 Standard (Text)

6 credits/sec
VideoAudio

Standard text-to-video with native audio

/models/kling-video-v3-standard-text/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.