API Docs

Introduction

Bring our image and video generation into your own product.

The API exposes exactly what the studio uses: the same models, the same pricing, the same render pipeline. Anything you can generate in the browser you can generate with a key, and the results land in your asset library all the same.

What you can do

Text / image to imageReference images, aspect ratios and 1K/2K/4K quality tiers. Up to 4 images per request.
Text / image to videoFirst and last frame, reference images, several resolution tiers. Duration is clamped to the chosen spec.
Pick your modelEvery model we ship is callable. Query /v1/models for available ids and pricing.
Check your balanceRead available credits any time, so a batch never dies halfway through.

API design

The shape follows OpenAI: keys start with sk-, travel in Authorization: Bearer, paths live under /v1, and failures return a fixed error object. If you have used the OpenAI SDK, swapping the base URL gets you most of the way.

Image generation works both ways. By default it is synchronous: the call waits until the image is ready and returns the same shape as the OpenAI images/generations endpoint, so the OpenAI SDK and relay gateways can treat this platform as a drop-in compatible provider. Pass async: true to switch to the asynchronous flow — you get a task id immediately and read the result from GET /v1/tasks/{id}.

Video generation is asynchronous only: rendering takes minutes, so holding the connection open would sit right at the gateway timeout and a timeout retry would bill you twice. Prefer the asynchronous flow for images too when you run batches or care about latency.

Base URL for every endpoint: https://open.pikpikgo.com/v1

Next steps