Skip to main content
POST
/
api
/
ai
/
v1
/
messages
Anthropic Chat
curl --request POST \
  --url https://aitoearn.cn/api/ai/v1/messages \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "messages": [
    {
      "content": "<unknown>"
    }
  ],
  "model": "<string>"
}
'
{}

Authorizations

X-Api-Key
string
header
required

Need to get API Key from AiToEarn. Click to go to "API Key Obtaining Tutorial".

Body

application/json
messages
object[]
required

Message list

Minimum array length: 1
model
string
required

Model ID. First call the "Conversation Model List" interface (GET /api/ai/models/chat) and pass in the data[n].name returned by it.

max_tokens
integer
default:32000

Maximum token value

Required range: 1 <= x <= 9007199254740991

Response

Native third-party protocol response or SSE data, not wrapped in the AiToEarn common response envelope.

Native third-party protocol response, not wrapped in the AiToEarn common response envelope.