> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atlaso.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Messages API

> Send Anthropic Messages requests through Atlaso.

`POST /v1/messages` accepts Anthropic Messages requests through the same Atlaso
key, memory scope and call record as the other chat routes. For a key set to
**Memory for each user of my app**, send the app user's ID in the
`x-atlaso-user` header from your server.

The request's `metadata.user_id` does not select an app user's memory. Without
`x-atlaso-user`, Atlaso answers the Messages request without memory and reports
`reason=no_user_id` in `x-atlaso-memory`. If both values are present and differ,
Atlaso refuses the request with `400 user_id_conflict` before calling a provider.

```bash theme={null}
curl --fail-with-body "$ATLASO_BASE_URL/messages" \
  -H "Authorization: Bearer $ATLASO_KEY" \
  -H 'Content-Type: application/json' \
  -H 'x-atlaso-user: demo-user-42' \
  -d '{"model":"anthropic/claude-sonnet-5.5","max_tokens":256,"messages":[{"role":"user","content":"Which units do I prefer?"}]}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.