Unified model access
Call public model IDs with one API key and one stable API surface.
Async media tasks
Long-running image and video generation jobs return a
task_id immediately. Poll GET /v1/tasks/{task_id} to retrieve results when they are ready.Multi-format chat
Start with the OpenAI-compatible
/v1/chat/completions endpoint, then adopt Anthropic-compatible /v1/messages or Gemini-compatible /v1beta/models/{model}:generateContent endpoints as your integration evolves.Credits and traceability
Every request can be tied to credits, task history, standardized results, and usage records.
Base URL
API base URL:Public API shape
APIAny.AI exposes a small, predictable set of public calling patterns:- Chat completions —
POST /v1/chat/completions: OpenAI-compatible text generation and chat. - Anthropic-compatible messages —
POST /v1/messages: Anthropic Messages-compatible request and response shape. - Gemini-compatible content generation —
POST /v1beta/models/{model}:generateContent: Gemini generateContent-compatible request and response shape;{model}is the public APIAny.AI model ID. - Image generation (async) —
POST /v1/images/generations: Create an asynchronous image generation task and receive atask_id. - Image generation (sync) —
POST /v1/images/generations/sync: Generate an image and wait for the result when the request fits a simple blocking workflow. - Image editing —
POST /v1/images/edits: Apply edits or inpainting to an existing image using a model and prompt. - Video generation (async) —
POST /v1/videos/generations: Create an asynchronous video generation task and receive atask_id. - Video generation (sync) —
POST /v1/videos/generations/sync: Generate a video and wait for the result when a blocking workflow is acceptable. - Task lookup —
GET /v1/tasks/{task_id}: Retrieve the current status and final result of any asynchronous image or video task. - Credits balance —
GET /v1/credits/balance: Check how many credits remain on your account at any time.