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

# Anthropic

`POST /v1/message`

Anthropic

## Headers

- `Aiproxy-Channel` string

## Request body

- ModelAnthropicMessageRequest
  - `messages` ModelMessage[]
    - `content` unknown
    - `name` string
    - `reasoning_content` string
    - `role` string
    - `tool_call_id` string
    - `tool_calls` ModelTool[]
      - `function` ModelFunction
        - `arguments` string
        - `description` string
        - `name` string
        - `parameters` unknown
      - `id` string
      - `type` string
  - `model` string

## Response `200`

OK

- ModelTextResponse
  - `choices` ModelTextResponseChoice[]
    - `finish_reason` 'stop' | 'length' | 'content_filter' | 'tool_calls' | 'function_call'
    - `index` integer
    - `message` ModelMessage
      - `content` unknown
      - `name` string
      - `reasoning_content` string
      - `role` string
      - `tool_call_id` string
      - `tool_calls` ModelTool[]
        - `function` ModelFunction
          - `arguments` string
          - `description` string
          - `name` string
          - `parameters` unknown
        - `id` string
        - `type` string
    - `text` string
  - `created` integer
  - `id` string
  - `model` string
  - `object` string
  - `usage` GithubComLabringAiproxyCoreRelayModelUsage
    - `completion_tokens` integer
    - `completion_tokens_details` ModelCompletionTokensDetails
      - `accepted_prediction_tokens` integer
      - `audio_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
    - `total_tokens` integer
    - `web_search_count` integer

## Changes

- **2025-05-23** `544096a3f194` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/labring/apis/ai-proxy-swagger-api/changes/v1/message/post.md)

---

[API](https://skmtc.dev/labring/apis/ai-proxy-swagger-api.md) · [All operations](https://skmtc.dev/labring/apis/ai-proxy-swagger-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/labring/ai-proxy-swagger-api/revisions/544096a3f194/schema)
