APIMODELSAPIMODELS
Документация API

apimodels.app

API Documentation

Complete API reference for all available models. Get started with our unified API interface.

Quick Start

1

Get your API Key

Create an API key in your Console

2

Make API Requests

Use Bearer token authentication with your API key

3

Pay per Use

Billed only for successful requests. Your balance is denominated in US dollars (USD).

Base URL

https://api.apimodels.app/v1https://apimodels.app/api/v1

Both hosts serve the same API with the same key, interchangeable at any time. We recommend the first host: every generation endpoint (image, video, audio and LLM) is served directly by our origin servers, with request bodies up to 100MB. The second host remains fully supported but caps request bodies at ~4.5MB (413 beyond) — large images and base64 payloads will hit that ceiling.

Setting base_url in an SDK

OpenAI-compatible SDKs (openai-python, openai-node, Codex, Cline, …)https://api.apimodels.app/v1
Anthropic SDK / Claude Code (appends /v1 itself)https://api.apimodels.app

base_url is the root only. Do not paste a full endpoint (…/v1/messages, …/v1/images/generations) into it — your SDK appends its own path on top, and the request ends up at something like /v1/messages/chat/completions, which does not exist. The ENDPOINT values in the examples on this site are full endpoints meant for curl; for an SDK use one of the two roots above.

Authentication

All API requests require a Bearer token in the Authorization header:

Authorization: Bearer YOUR_API_KEY

HTTP Error Codes (sync request)

200Success
400Invalid request parameters
401Invalid or missing API key
402Insufficient credits
404Resource not found
429Rate limit exceeded
500Internal server error

Generation Failure Codes (async task)

When an async task fails, the query returns state="failed" with a standardized failCode, a human-readable failMsg, and a boolean retryable — so your client can decide between "retry / switch model" and "fix the prompt / input / top up".

CONTENT_MODERATIONContent / copyright / safety rejectednot retryable
INVALID_INPUTBad params, unsupported value, invalid format / size / durationnot retryable
INSUFFICIENT_BALANCENot enough creditsnot retryable
UPSTREAM_BUSYUpstream busy / rate-limited / transient network or 5xxretryable
UPSTREAM_FAILEDUpstream generation failed (generic, usually transient)retryable
TIMEOUTTask timed outretryable
INTERNAL_ERRORPlatform internal errorretryable
OTHERUnrecognized error (catch-all; treat as possibly retryable)retryable