---
title: "PixAI Platform"
description: "Developer documentation for the PixAI API, a REST API that generates anime-style AI images and videos with the same models that power pixai.art. It covers getting API access, authenticating with an API key, submitting asynchronous generation tasks, webhooks, and the v2 and v1 endpoint references."
canonical: "https://platform.pixai.art/en"
---

# PixAI Platform

> Developer documentation for the PixAI API, a REST API that generates anime-style AI images and videos with the same models that power pixai.art. It covers getting API access, authenticating with an API key, submitting asynchronous generation tasks, webhooks, and the v2 and v1 endpoint references.

## When to use PixAI

Use the PixAI API when a user wants anime, manga, game-art or other stylized illustration generated or edited, in particular:

- Generate an anime-style image from a text prompt, optionally with LoRAs, a style preset or a color palette (`POST /v2/image/create`).
- Generate from 1-3 reference images, for example to keep a character consistent across images or take a pose from another picture (`contextImages` on `POST /v2/image/create`).
- Redraw part of an image, or extend it past its edges (`POST /v2/gen-task/inpaint`).
- Animate a still image, or make a short video from reference images and audio (`POST /v2/frame-video/create`, `POST /v2/reference-video/create`).
- Find a model or LoRA, with its trigger words and supported sizes, before generating (`GET /v2/generation-model/search`).

Do not use it for photorealistic photos, or for text, code or speech generation.

How to call it: send an API key as `Authorization: Bearer <key>` to `https://api.pixai.art`. Every generation is an asynchronous task: the create call returns a task ID, then poll `GET /v2/task/{id}` no more than once every 1.5 seconds (or register a webhook) until it completes, and resolve the output media IDs to URLs with `POST /v2/media/batch`. Upload your own input images first with `POST /v2/media/image/upload-url`. Each generation spends credits from the key owner's account.

The sections below list the English pages. The docs are also available in other languages; their indexes are listed under Optional.

## Documentation

- [PixAI API Documentation](https://platform.pixai.art/en/docs): Developer docs for the PixAI API: generate anime-style AI images with a REST API, API-key auth, async tasks and webhooks, then explore the v2 and v1 references.
- [FAQ](https://platform.pixai.art/en/docs/faq): Answers to common PixAI API questions: email vs. membership API keys, maintenance notices, whether API images appear in public history, and support languages.

## Quick Start

Get started with the PixAI API, from signing up to making your first request.

- [How can I use PixAI API?](https://platform.pixai.art/en/docs/quick-start/enroll-in-api): Learn how to sign up for PixAI API access and get your API key.
- [Your First API Call](https://platform.pixai.art/en/docs/quick-start/first-api-call): Submit a task, poll its status and download the image, step by step, to make your first PixAI API request.
- [Limits](https://platform.pixai.art/en/docs/quick-start/limits): Learn about PixAI API rate limits, concurrency limits, and current feature limitations.
- [About this doc](https://platform.pixai.art/en/docs/quick-start): An overview of the PixAI API documentation and how to get started building with the PixAI platform.

## API v2 Documentation

The current API: image and video generation, image editing, uploads, and lookups for models, LoRAs and color palettes.

### Image

Generate and edit images.

- [Create an image generation task](https://platform.pixai.art/en/docs/api-v2/image/createImage): Start an asynchronous image generation task with the simplified v2 API. The response returns the new task's ID.
- [Create an inpaint, outpaint or redraw task](https://platform.pixai.art/en/docs/api-v2/image/createInpaint): Edits an existing image:
- [Get the limits of an inpaint preset](https://platform.pixai.art/en/docs/api-v2/image/getInpaintConstraints): Returns the size limits and redraw presets of an inpaint modelPreset. An unknown preset answers null fields rather than an error. No authentication is needed.

### Video

Generate videos from images and references.

- [Create an image-to-video task](https://platform.pixai.art/en/docs/api-v2/video/createFrameVideo): Animates an image into a video with PixAI's Tsubaki video model. The video starts on firstFrameMediaId and, when you send lastFrameMediaId, ends on it. The output keeps the first frame's aspect ratio.
- [Create a reference video task](https://platform.pixai.art/en/docs/api-v2/video/createReferenceVideo): Generates a video guided by reference images, and depending on the model, reference videos and audio.

### Task

Read a task and its results.

- [Get a task](https://platform.pixai.art/en/docs/api-v2/task/getTask): Reads a task created by any v2 endpoint. Poll it every few seconds until status is completed, failed or cancelled.

### Media

Upload input files and resolve media IDs to URLs.

- [Get media URLs by ID](https://platform.pixai.art/en/docs/api-v2/media/batchGetMedia): Resolves up to 100 media IDs to their URLs, for example the outputs.mediaIds or outputs.videoMediaId of a finished task. No authentication is needed for public media.
- [Get an upload URL for an audio file](https://platform.pixai.art/en/docs/api-v2/media/getAudioUploadUrl): Step 1 of uploading an audio clip for referenceAudioMediaIds of POST /v2/reference-video/create. The flow is the same as for images: PUT the bytes to uploadUrl with the file's Content-Type (audio/mpeg or audio/wav), then call POST /v2/media/audio/register.
- [Get an upload URL for an image](https://platform.pixai.art/en/docs/api-v2/media/getImageUploadUrl): Step 1 of uploading an image you want to use as an input, for example a contextImages entry, a video frame or an inpaint base image.
- [Inspect a video or audio file](https://platform.pixai.art/en/docs/api-v2/media/getMediaInfo): Returns the duration, size, containers and codecs of a video or audio media item, so you can check a reference file against the model's limits before creating a reference video task.
- [Register an uploaded audio file](https://platform.pixai.art/en/docs/api-v2/media/registerAudio): Step 3 of uploading an audio clip. The returned id is the media ID to pass in referenceAudioMediaIds.
- [Register an uploaded image](https://platform.pixai.art/en/docs/api-v2/media/registerImage): Step 3 of uploading an image: turns the uploaded file into a media item. Call it after the PUT to uploadUrl has succeeded. The returned id is the media ID to pass to other endpoints.

### Model

Find models, LoRAs, sizes and color palettes.

- [Get a model or LoRA](https://platform.pixai.art/en/docs/api-v2/model/getGenerationModel): Reads one model by its model ID (the id of a search result).
- [Get a model version](https://platform.pixai.art/en/docs/api-v2/model/getGenerationModelVersion): Reads one model version by its version ID, the ID that generation endpoints take. Use it to look up a LoRA's trigger words and base model before generating.
- [Get the sizes a model version accepts](https://platform.pixai.art/en/docs/api-v2/model/getModelSizeConfig): Lists the sizes a model version accepts for width/height of POST /v2/image/create. Despite the path, the parameter is a version ID.
- [List color palette presets](https://platform.pixai.art/en/docs/api-v2/model/listColorPalettePresets): Lists PixAI's official color palettes for colorPalette of POST /v2/image/create. To use one, send the whole preset object with "source": "preset" added.
- [List the versions of a model](https://platform.pixai.art/en/docs/api-v2/model/listGenerationModelVersions): Lists a model's versions, newest first. Pass a version's id as modelVersionId or loras[].modelId to pin an older version.
- [Search models and LoRAs](https://platform.pixai.art/en/docs/api-v2/model/searchGenerationModels): Searches the PixAI Model Market. Use it to find a base model for modelVersionId, or LoRAs for loras of POST /v2/image/create.

## API Documentation

The v1 endpoints for reading task status and for retrieving or uploading media by ID.

### Task

API endpoints for creating and managing image generation tasks.

- [Get task detail by ID](https://platform.pixai.art/en/docs/api/task/getTask): Fetch a generation task by ID to check its status (waiting, running, completed, cancelled or failed) and read the IDs and URLs of the media it produced.

### Media

API endpoints for uploading media and for retrieving generated media by ID.

- [Get media by ID](https://platform.pixai.art/en/docs/api/media/getMedia): Look up a media item by ID and get its type, dimensions and the URLs of each of its variants.
- [Get media image by ID](https://platform.pixai.art/en/docs/api/media/getMediaImage): Redirect with HTTP 302 to the image file of a media item, so a media ID can be used directly as an image URL.
- [Upload an image or video](https://platform.pixai.art/en/docs/api/media/uploadMedia): Upload an image or video and receive a media ID that identifies the stored file.

## Extras

Additional references including available models, webhook notifications, and supported resolutions.

- [Models](https://platform.pixai.art/en/docs/references/models): List of PixAI image-generation models with type, version, and allowed sampling methods.
- [Webhook](https://platform.pixai.art/en/docs/references/webhook): Get a POST request when a PixAI API task starts, completes, is cancelled or fails, through webhooks on your profile or a per-request callbackUrl.
- [Supported Resolutions](https://platform.pixai.art/en/docs/references/supported-resolutions): Output width and height of the v2 API for each of the 11 aspect ratios at the 1k and 1.5k size tiers, plus the defaults.

## About

Information about copyright, licensing terms, and how to provide feedback.

- [Copyright & related rights](https://platform.pixai.art/en/docs/about/copyright): Learn about copyright ownership, licensing terms, and usage rights for content generated through the PixAI API.
- [User feedback](https://platform.pixai.art/en/docs/about/feedback): Share your feedback or report issues during the PixAI API beta — reach us via email or Discord.

## OpenAPI specs

Machine-readable OpenAPI 3.1 specs of the endpoints above, for agents and client generators.

- [API v2 spec](https://platform.pixai.art/openapi-spec.v2.yaml): image and video generation, inpainting, uploads, tasks and model lookups, with every request field and error code. The English spec is also served as [/openapi.json](https://platform.pixai.art/openapi.json).
- [API v1 spec](https://platform.pixai.art/openapi-spec.yaml): task status, media lookup and media upload.

## Optional

- [Japanese index](https://platform.pixai.art/ja/llms.txt): This index for the Japanese pages.
- [Korean index](https://platform.pixai.art/ko/llms.txt): This index for the Korean pages.
- [Full documentation text](https://platform.pixai.art/llms-full.txt): Every docs page, in every language, as Markdown in one file.
