Chat & Responses

Create Message

Creates a message using the Anthropic-compatible Messages format.

POST/v1/messages

Parameters

ParameterType / locationDescription
modelRequiredstringbody

Exact compatible model ID.

messagesRequiredarraybody

Input messages for the conversation.

max_tokensRequiredintegerbody

Maximum number of generated tokens.

streamOptionalbooleanbody

Streams message events when true.

thinkingOptionalobjectbody

Extended-thinking configuration for supported models.

Request examples

cURL
curl --request POST \
  --url 'https://api.juhenextvip.com/v1/messages' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "claude-sonnet-5",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": "Summarize the benefits of caching."
    }
  ]
}'

Response examples

JSON
{
  "id": "msg_...",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": "Caching reduces latency and upstream load..."
    }
  ],
  "stop_reason": "end_turn"
}

Usage notes

  • Use a model that supports the Messages format. Check the live Models page before integration.