---
title: Messages API
description: Use Anthropic-compatible messages with the required version header and output limit.
lastUpdated: 2026-09-08
---

Applications built around Anthropic Messages can use `POST /v1/messages`.

Include these headers:

```text
Authorization: Bearer YOUR_API_KEY
anthropic-version: 2023-06-01
Content-Type: application/json
```

## Parameters

| Parameter | Required | Meaning |
| --- | --- | --- |
| `model` | Yes | Exact Claude model ID available to your key. |
| `messages` | Yes | Current input and conversation history. |
| `max_tokens` | Yes | Maximum generated output length; must be at least 1. |
| `system` | No | System prompt. |
| `thinking` | No | Thinking configuration, only where supported by the selected model. |

Preserve the Messages request structure when moving an existing Anthropic-compatible application. Do not send an OpenAI `messages` request with incompatible fields unchanged to this endpoint.

[Claude Code setup](/en/client-integrations/claude-code) uses the origin `https://infistar.ai`, without `/v1`; the client adds the request path itself.
