API reference
Meta Model API is an HTTP API served at https://api.meta.ai/v1 and authenticated with a bearer token. This reference documents each resource's request and response schema. For a task-oriented introduction, start with the Quickstart; to choose a request format, see Choosing an API.
Base URL and authentication
| Base URL | https://api.meta.ai/v1 |
| Auth header | Authorization: Bearer $MODEL_API_KEY |
| Env var | MODEL_API_KEY |
Create and manage keys in the Model API dashboard; see the Authentication guide for storage and rotation.
Resources
- Responses:
POST /v1/responsesand related endpoints — server-managed, agentic generation with reasoning replay. OpenAI-compatible. - Chat completions:
POST /v1/chat/completions— the OpenAI-compatible messages-array endpoint. - Messages:
POST /v1/messages— the Anthropic Messages-compatible endpoint. - Files:
POST /v1/files(upload),GET /v1/files(list),GET/DELETE /v1/files/{file_id}(retrieve/delete a single file) — upload and manage files referenced in requests. - Models:
GET /v1/models— list available models and retrieve model details. - Status:
GET /v1/status— unauthenticated service-health endpoint.
Errors and rate limits
Errors use an OpenAI-style envelope — { "error": { "message", "type", "param", "code" } }. Branch on type and message. See Error handling for the full list of types, status codes, and retry guidance.
Rate limits apply per team. See Pricing and rate limits for the current tiers and headers.