---
title: "Anthropic"
method: POST
path: "/v1/messages"
tags: ["relay"]
---

# Anthropic

`POST /v1/messages`

Anthropic

## Headers

- `Aiproxy-Channel` string

## Request body

- ModelAnthropicMessageRequest
  - `messages` ModelMessage[]
    - `audio` ModelOutputAudio
      - `data` string
      - `expires_at` integer
      - `id` string
      - `transcript` string
    - `content` unknown
    - `name` string
    - `reasoning_content` string
    - `role` string
    - `signature` string
    - `tool_call_id` string
    - `tool_calls` ModelToolCall[]
      - `extra_content` ModelExtraContent
        - `google` ModelGoogleExtraContent
          - `thought_signature` string
      - `function` ModelFunction
        - `arguments` string
        - `description` string
        - `name` string
        - `parameters` unknown
      - `id` string
      - `index` integer
      - `type` string
  - `model` string

## Response `200`

OK

- ModelTextResponse
  - `choices` ModelTextResponseChoice[]
    - `finish_reason` 'stop' | 'length' | 'content_filter' | 'tool_calls' | 'function_call'
    - `index` integer
    - `message` ModelMessage
      - `audio` ModelOutputAudio
        - `data` string
        - `expires_at` integer
        - `id` string
        - `transcript` string
      - `content` unknown
      - `name` string
      - `reasoning_content` string
      - `role` string
      - `signature` string
      - `tool_call_id` string
      - `tool_calls` ModelToolCall[]
        - `extra_content` ModelExtraContent
          - `google` ModelGoogleExtraContent
            - `thought_signature` string
        - `function` ModelFunction
          - `arguments` string
          - `description` string
          - `name` string
          - `parameters` unknown
        - `id` string
        - `index` integer
        - `type` string
    - `text` string
  - `created` integer
  - `id` string
  - `model` string
  - `object` string
  - `usage` ModelChatUsage
    - `completion_tokens` integer
    - `completion_tokens_details` ModelCompletionTokensDetails
      - `accepted_prediction_tokens` integer
      - `audio_tokens` integer
      - `image_tokens` integer
      - `reasoning_tokens` integer
      - `rejected_prediction_tokens` integer
    - `prompt_tokens` integer
    - `prompt_tokens_details` ModelPromptTokensDetails
      - `audio_tokens` integer
      - `cache_creation_tokens` integer
      - `cached_tokens` integer
      - `image_tokens` integer
      - `video_tokens` integer
    - `total_tokens` integer
    - `web_search_count` integer

---

[API](https://skmtc.net/labring/apis/ai-proxy-swagger-api.md) · [All operations](https://skmtc.net/labring/apis/ai-proxy-swagger-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/labring/ai-proxy-swagger-api/versions/e471487f2a2f/schema)
