Skip to main content

Image API

Image API — generated on PixelDojo
AI Generated

Generated on PixelDojo with Z-Image Turbo. Produced by PixelDojo's generation pipeline.

Cancel anytimeCommercial-use license50+ AI models

You generate AI images via an API by sending a prompt to a model endpoint and reading back an image URL. On PixelDojo that is a POST to https://pixeldojo.ai/api/v1/models/{modelId}/run with a Bearer key, and if the model finishes quickly the first response already carries the image, otherwise you poll GET https://pixeldojo.ai/api/v1/jobs/{jobId} until the status flips to completed. We timed two models through that public pipeline on August 26, 2026: Z-Image Turbo came back in about 20 seconds and Flux 2 Pro in about 21 seconds, both inside the 30 second sync window, so neither one needed a polling loop.

An actual response from the API call above

Every example below was produced on PixelDojo. Hover to see the prompt.

Example: A woman in her 30s with short curly red hair, round glasses, a denim jacket over

A woman in her 30s with short curly red hair, round glasses, a denim jacket over a yellow shirt, standing in a bookshop aisle holding a paperback, warm tungsten light, photorealistic

z-image-turbo

Details worth knowing before you wire it up

The request body is flat and strict

No nested input wrapper and no free-form passthrough. You send prompt at the top level alongside that model's documented options, and anything the schema does not recognize is refused. Silent parameter drops are the worst failure mode in a generation API, so this one refuses instead.

Draft cheap, finish expensive

The price spread across the catalog is thirty to one, so the useful pattern is to iterate on a 0.1 or 0.5 credit model and only re-run the settled prompt on an expensive one. Our 0.5 credit Z-Image Turbo run held its own against models several times its price on skin and hand texture.

Uploads for image-to-image and edits

The upload endpoint takes a multipart file and returns a URL valid for 24 hours. That URL is what you feed into an edit or image-to-image model on the next call, so you never have to host a public bucket just to pass an input in.

One integration, images and video

The run and job endpoints are the same for both modalities. Adding video later means calling a different model id, not building a second pipeline, and the credits come out of the same balance.

The two timings on this page are our own runs through the public API on August 26, 2026, not vendor-published benchmarks. The image below the fold is an actual output from that session.

Why Choose Pixel Dojo for Image API

Professional-quality results with cutting-edge AI technology

TL;DR: the whole integration is one call

curl -X POST "https://pixeldojo.ai/api/v1/models/z-image-turbo/run" -H "Authorization: Bearer pd_your_key" -H "Content-Type: application/json" -d '{"prompt": "a red fox in snow"}'. That is it. Z-Image Turbo costs 0.5 credits per image and returned in about 20 seconds on our August 26, 2026 run.

One key covers 144 models

The same Bearer key works across the whole catalog, 144 models as of August 26, 2026, image and video alike. Moving from a 0.5 credit draft model to a 3 credit finish model is a change to one path segment, not a new account, a new SDK or a new billing relationship.

Async, with a sync short circuit

Every call creates a job. When the model finishes inside the 30 second window the first response already carries the image URL and a completed status, so fast models need no polling code at all. Slower models return pending and you poll the job endpoint. One code path handles both.

Docs your tooling can read without you

https://pixeldojo.ai/llms.txt lists the live catalog with a credit cost against every model, and https://pixeldojo.ai/api/openapi serves an OpenAPI 3.1 spec you can generate a typed client from. Both read from the live registry, so a model that gets enabled or disabled shows up without a redeploy.

How It Works

1

Create one key on the API platform

Keys carry a pd_ prefix and are not scoped per model. One key authenticates every image model, every video model, the upload endpoint and the job endpoint.

2

POST the prompt to a model

Send POST to https://pixeldojo.ai/api/v1/models/{modelId}/run with an Authorization Bearer header and a flat JSON body. Body keys are prompt plus whatever optional fields that model documents, such as aspect_ratio. Unknown keys are rejected rather than ignored, so a typo fails loudly instead of silently.

3

Read the result, or poll the job

If the response status is completed, the image URL is already in it. If it is pending, poll GET https://pixeldojo.ai/api/v1/jobs/{jobId} until it flips. Both of our August 26, 2026 image runs completed on the first response.

4

Pass an image in when the model needs one

Edit and image-to-image models take a source image. POST the file to the upload endpoint, which hands back a URL that lives for 24 hours, then pass that URL into the next run call.

Start generating from code in one request

Loved by creators on PixelDojo

Real feedback from people using PixelDojo, pulled from our in-product surveys.

Creative freedom, range of tools and options.
Verified PixelDojo creator
I love the training feature
Verified PixelDojo creator
the quality is the best
Verified PixelDojo creator
All the tools needed in one dashboard
Verified PixelDojo creator
Very fair and very broad in tools.
Verified PixelDojo creator
Accurate results
Verified PixelDojo creator

Common Questions

Everything you need to know about Image API

How fast is an image API call in practice?

We measured two on August 26, 2026 through the public pipeline. Z-Image Turbo took about 20 seconds at 0.5 credits, and Flux 2 Pro took about 21 seconds at 1.5 credits. Both finished inside the 30 second sync window, so both came back on the first response with no polling.

Do I need a polling loop?

Write one anyway, but expect fast models to skip it. The run endpoint returns a completed status with the image URL when the model finished in time, and a pending status with a job id when it did not. Handling both branches is a few lines and it means slow video models work through the same code.

Can an AI agent call this without me writing a client?

Yes. There is a hosted MCP server at https://pixeldojo.ai/mcp that any remote-capable MCP client can point at, and a local install for editors that prefer stdio, set up with npx @pixeldojo/mcp init. Same key, same catalog, same credits, no client code.

How do I pick a model programmatically?

Read the catalog. https://pixeldojo.ai/llms.txt lists every enabled model with its description and its credit cost in plain text, and the OpenAPI spec at https://pixeldojo.ai/api/openapi carries the same set as a machine-readable document. Both are generated from the live registry rather than hand-maintained.

What does a generated image cost per call?

It depends on the model, and the spread is wide. The catalog on August 26, 2026 ran from 0.1 credits for Flux 2 Klein 4B up to 3 credits for Nano Banana Pro, with Z-Image Turbo at 0.5 and most of the mid-tier at 1 credit. Credits come out of one subscription rather than a separate compute bill.

Is the image URL permanent?

The generated output is written to our CDN and stays reachable. Files you upload as inputs are different: the upload endpoint returns a URL that expires after 24 hours, because those are inputs to a job, not deliverables.

Point an agent at the catalog instead

Ready to Create Amazing Image API Images?

Join thousands of creators using AI to bring their ideas to life