Meta Model API

Start here

Overview
Quickstart
Authentication
Models
SDKs and libraries
Pricing and rate limits

Capabilities

Tool calling
Tool search
Search grounding
Image understanding
Video understanding
File handling
Reasoning
Structured output
Prompt caching
Token counting

Protocols

Choosing an API
Responses API
Chat Completions API
Messages API

Cookbook

All recipes
API fundamentals
Agent patterns
Use cases
Building with Muse Code

Muse Code

Overview
Authentication and billing
Permissions and safety
Working with the agent
Configuration and context
Extending and automating

Muse Glimmer

Overview
Get the model
Prompting guide
Quantization
Speculative decoding
Run inference
Customization

Agent guides

Coding agents
Agent frameworks
Computer use

API reference

Introduction
Error handling
Status
Responses
Chat completions
Messages
Files
Models

Log in

--- meta: title: Choosing an API — Meta Model API description: Compare the Responses, Chat Completions, and Messages formats on Meta Model API — same models, same auth, same cost — and pick the one your code already speaks. keywords: Meta Model API, Responses API, Chat Completions, Messages API, OpenAI compatible, Anthropic compatible, choosing an API cms: layout: large alias: /model-api/docs/protocols target: aidmc --- # Choosing an API Model API speaks three request formats — the [Responses API](/docs/protocols/responses), [Chat Completions](/docs/protocols/chat-completions), and the [Messages API](/docs/protocols/messages). All three run the same models, use the same bearer-token auth, and cost the same per token. Pick the format your code already speaks; the model and features underneath are identical. ## At a glance {#at-a-glance} | Format | Endpoint | Best for | Reasoning across turns | | --- | --- | --- | --- | | **Responses** | `POST /v1/responses` | Agents and multi-step tool loops; the full feature set | Yes — encrypted replay or `previous_response_id` | | **Chat Completions** | `POST /v1/chat/completions` | Dropping into existing OpenAI messages-array code | No (reasoning is not carried between turns) | | **Messages** | `POST /v1/messages` | Anthropic-format tools such as Claude Code | Yes — via Anthropic `thinking` replay | ## Responses API {#responses} The recommended default for new work. It is OpenAI-compatible and exposes the full feature set: cross-turn reasoning replay (stateless encrypted items or server-managed `previous_response_id`), [search grounding](/docs/search-grounding), [tool search](/docs/tool-search), background execution, and [file inputs](/docs/file-handling). Reach for it for agentic and coding workloads where reasoning continuity across tool turns matters. Use the OpenAI SDK pointed at `https://api.meta.ai/v1`. See the [Responses API guide](/docs/protocols/responses). ## Chat Completions {#chat-completions} The classic OpenAI messages-array endpoint. It is the simplest drop-in if your code already calls `/v1/chat/completions`: point the client at the base URL, swap the key, and keep the rest. It does not carry reasoning across turns for external keys, and [search grounding](/docs/search-grounding) runs on the Responses API only. [Tool calling](/docs/tool-calling) with `function` tools is fully supported. See the [Chat Completions guide](/docs/protocols/chat-completions). ## Messages API {#messages} An Anthropic Messages-compatible wire format over the same inference pipeline as Responses. Use it for Claude-oriented tools and the Anthropic SDK — point the SDK at the base host `https://api.meta.ai` (it appends `/v1/messages`) with your `MODEL_API_KEY`. It is stateless, so replay history client-side. See the [Messages API guide](/docs/protocols/messages). ## How to choose {#how-to-choose} - **Building an agent or coding workflow**: use the **Responses API** for reasoning continuity, search grounding, and background execution. - **Already have OpenAI `chat.completions` code**: start with **Chat Completions** for the fastest drop-in, and move to Responses when you need reasoning replay or search grounding. - **Using Claude Code or the Anthropic SDK**: use the **Messages API** and keep your existing Anthropic-format requests. ## Next steps - Make your first call in the [Quickstart](/docs/quickstart). - Wire the model into your editor with the [coding agents guide](/docs/coding-agents). - Verify request and response schemas in the [API reference](/docs/api-reference).

Choosing an API

Model API speaks three request formats — the Responses API, Chat Completions, and the Messages API. All three run the same models, use the same bearer-token auth, and cost the same per token. Pick the format your code already speaks; the model and features underneath are identical.

At a glance

Format
Endpoint
Best for
Reasoning across turns
Responses
POST /v1/responses
Agents and multi-step tool loops; the full feature set
Yes — encrypted replay or previous_response_id
Chat Completions
POST /v1/chat/completions
Dropping into existing OpenAI messages-array code
No (reasoning is not carried between turns)
Messages
POST /v1/messages
Anthropic-format tools such as Claude Code
Yes — via Anthropic thinking replay

Responses API

The recommended default for new work. It is OpenAI-compatible and exposes the full feature set: cross-turn reasoning replay (stateless encrypted items or server-managed previous_response_id), search grounding, tool search, background execution, and file inputs. Reach for it for agentic and coding workloads where reasoning continuity across tool turns matters. Use the OpenAI SDK pointed at https://api.meta.ai/v1. See the Responses API guide.

Chat Completions

The classic OpenAI messages-array endpoint. It is the simplest drop-in if your code already calls /v1/chat/completions: point the client at the base URL, swap the key, and keep the rest. It does not carry reasoning across turns for external keys, and search grounding runs on the Responses API only. Tool calling with function tools is fully supported. See the Chat Completions guide.

Messages API

An Anthropic Messages-compatible wire format over the same inference pipeline as Responses. Use it for Claude-oriented tools and the Anthropic SDK — point the SDK at the base host https://api.meta.ai (it appends /v1/messages) with your MODEL_API_KEY. It is stateless, so replay history client-side. See the Messages API guide.

How to choose

  • •Building an agent or coding workflow: use the Responses API for reasoning continuity, search grounding, and background execution.
  • •Already have OpenAI chat.completions code: start with Chat Completions for the fastest drop-in, and move to Responses when you need reasoning replay or search grounding.
  • •Using Claude Code or the Anthropic SDK: use the Messages API and keep your existing Anthropic-format requests.

Next steps

  • •Make your first call in the Quickstart.
  • •Wire the model into your editor with the coding agents guide.
  • •Verify request and response schemas in the API reference.
Was this page helpful?
At a glance
Responses API
Chat Completions
Messages API
How to choose
Next steps