---
title: "The hosted model, as the Anthropic Messages API"
method: POST
path: "/v1/model/messages"
tags: ["Hosted model"]
---

# The hosted model, as the Anthropic Messages API

`POST /v1/model/messages`

## Request

- Base URL: `https://api.uxduck.com`
- URL: `https://api.uxduck.com/v1/model/messages`
- Auth: HTTP bearer

The Anthropic Messages API, streamed back unchanged. The server sends its own instructions, takes only plain function tools, caps output and enforces spending budgets. A request without X-UXDuck-Continues starts a chat. Refusals are in the provider's error shape, with type uxduck.

## Headers

- `X-UXDuck-Continues` string
- `X-UXDuck-Thread` string
- `X-UXDuck-Share` 'conversations'

## Request body

- object
  - `model` string, required

## Response `200`

The provider's answer, as it streams

## Other responses

- `400`: too-large, bad-request or model
- `401`: session: no signed session, or it has expired
- `402`: daily-cap or global-cap
- `403`: continuation: the chat is not this account's; ai-chat-off: AI chat is turned off for this account
- `429`: provider: the model provider is temporarily throttling requests
- `503`: The hosted model is not set up here

---

[API](https://skmtc.dev/uxduck/apis/uxduck-api.md) - [All operations](https://skmtc.dev/uxduck/apis/uxduck-api/llms.txt) - [OpenAPI document](https://skmtc.dev/uxduck/apis/uxduck-api/revisions/d594d81b2806?raw)
