Create message (Anthropic)

POSThttps://api.poe.com/v1/messages

Overview

Creates a message using the Anthropic Messages API format. This endpoint provides a drop-in replacement for the Anthropic API, allowing you to use your Poe subscription points to access Claude models.

⚠️ Claude Models Only: This endpoint only supports official Anthropic Claude models. You cannot use this endpoint to call custom bots or models from other providers. For access to all bots on Poe, use the OpenAI-compatible API or the Poe Python SDK.

Key benefits:

  • Drop-in replacement for Anthropic API
  • Works with existing Anthropic SDK code
  • Use your existing Poe subscription points
  • No separate Anthropic API key needed
  • Requests proxied directly to provider with minimal transformation

Features:

  • Streaming support via SSE
  • Tool calling (function calling)
  • Multi-modal inputs (text, images)
  • Vision capabilities

Authentication

Send your Poe API key in the Authorization header:

Authorization: Bearer sk_test_51SAMPLEKEY

All requests must be made over HTTPS.

Parameters

NameLocationTypeRequiredDescription
anthropic-versionheaderstringRequiredAnthropic API version (required)

Request body

FieldTypeRequiredDescription
modelstringRequiredClaude model to use. You can use either Poe bot names or Anthropic API model names.

Supported models:
- claude-sonnet-4, claude-sonnet-4-20250514
- claude-opus-4, claude-opus-4-20250514
- claude-sonnet-4.5, claude-sonnet-4-5-20250929
- claude-opus-4.5, claude-opus-4-5-20251101
- claude-haiku-3.5, claude-3-5-haiku-20241022
- And other Claude models available on Poe
max_tokensintegerRequiredMaximum number of tokens to generate
messagesobject[]RequiredA list of messages comprising the conversation
messages[].role"user" | "assistant"RequiredThe role of the message author Allowed values: user, assistant
messages[].contentstring | object[]RequiredThe contents of the message
systemstring | object[]OptionalSystem prompt for the conversation
temperaturenumberOptionalSampling temperature between 0 and 1 Min: 0 · Max: 1
top_pnumberOptionalNucleus sampling parameter
top_kintegerOptionalTop-k sampling parameter
streambooleanOptionalWhether to stream the response Default: false
stop_sequencesstring[]OptionalCustom sequences that will cause the model to stop
toolsobject[]OptionalDefinitions of tools the model may use
tool_choiceobjectOptionalHow the model should use the provided tools
metadataobjectOptionalMetadata about the request

Responses

FieldTypeRequiredDescription
idstringOptionalUnique identifier for the message
type"message"OptionalObject type, always "message" Allowed values: message
role"assistant"OptionalRole of the generated message Allowed values: assistant
contentobject[]OptionalArray of content blocks
content[].type"text" | "tool_use"OptionalType of content block Allowed values: text, tool_use
content[].textstringOptionalText content (for text blocks)
content[].idstringOptionalTool use ID (for tool_use blocks)
content[].namestringOptionalTool name (for tool_use blocks)
content[].inputobjectOptionalTool input (for tool_use blocks)
modelstringOptionalThe model that handled the request
stop_reason"end_turn" | "max_tokens" | "stop_sequence" | "tool_use"OptionalReason the model stopped generating Allowed values: end_turn, max_tokens, stop_sequence, tool_use
stop_sequencestring | nullOptionalThe stop sequence that caused generation to stop, if any
usageobjectOptional
usage.input_tokensintegerOptionalNumber of input tokens
usage.output_tokensintegerOptionalNumber of output tokens

❌ Error codes

HttpTypeDescription
400invalid_request_errorInvalid request Malformed request or missing required fields
401authentication_errorAuthentication failed Invalid API key
404not_found_errorModel not found Requested model not found. Only Claude models are supported.
429rate_limit_errorRate limit exceeded Rate limit exceeded (500 requests per minute)

🔁 Callbacks & webhooks

No callbacks or webhooks are associated with this endpoint.