Set the Anthropic SDK base URL to https://inference.pearlresearch.ai; the SDK adds the versioned path. Use the regional endpoint shown on Integrations.Errors use Anthropic’s shape, with the request ID in the body and in a request-id header; see the Inference API overview.
Reasoning
Set the effort with "output_config": {"effort": "high"} (in the Python SDK, via extra_body). Levels a model doesn’t serve round up to the next one it does, as on the other formats. Send "thinking": {"type": "disabled"} to turn thinking off; GLM-5.3 and GLM-5.3-Flash always think and return 400. Bound thinking with the effort or max_tokens, which covers the thinking and the answer. See how effort levels map.
Authorizations
xApiKeyinferenceKey
x-api-key
string
header
required
Your inference API key. Send this or Authorization; if you send both, they must carry the same key.
Headers
anthropic-version
string
required
One value, for example 2023-06-01. Missing returns 400.
Example:
"2023-06-01"
Body
application/json
model
string
required
A chat model ID from GET /models. A model that doesn't serve Messages returns 404.
max_tokens
integer
required
Cap on generated tokens, thinking included.
messages
object[]
required
The conversation, alternating user and assistant turns. Content is a string or an array of blocks; replay returned thinking and tool_use blocks, and answer each tool use with a tool_result block carrying its ID.
Show child attributes
system
stringarray · object[]
The system prompt.
stream
boolean
Stream named server-sent events, see the text/event-stream response below.
output_config
object
{"effort": …}, the reasoning effort; see Reasoning.
Show child attributes
thinking
object
{"type": "disabled"} turns thinking off. Thinking budgets (budget_tokens) are not supported by any model today and return 400.
Show child attributes
tools
object[]
Tool definitions. Support varies by model.
tool_choice
object
The choice policy. Support varies by model.
temperature
number
Sampling parameter.
top_p
number
Sampling parameter.
top_k
number
Sampling parameter.
stop_sequences
string[]
Custom stop sequences.
Response
The completion, or an event stream when streaming.
id
string
Message ID.
type
enum<string>
Always message.
Available options:
message
role
enum<string>
Always assistant.
Available options:
assistant
content
object[]
Content blocks: text, thinking on reasoning models, and tool_use when the model calls a tool.
Show child attributes
model
string
The model that served the request.
stop_reason
string
Why generation stopped, for example end_turn, max_tokens, stop_sequence, or tool_use.
stop_sequence
string | null
The stop sequence that matched, if any.
usage
object
input_tokens and output_tokens, what you're billed on, plus cache_read_input_tokens when the model reports cache reads.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Pearl Inference Platform","colors":{"primary":"#2A2623","light":"#EFEDEA","dark":"#2A2623"},"logo":{"light":"https://mintcdn.com/pearl-research/qjVPdghcpi_iWwgo/logo/light.svg?fit=max\u0026auto=format\u0026n=qjVPdghcpi_iWwgo\u0026q=85\u0026s=a969569c61ca3aa40012ac0f3dbbe445","dark":"https://mintcdn.com/pearl-research/qjVPdghcpi_iWwgo/logo/dark.svg?fit=max\u0026auto=format\u0026n=qjVPdghcpi_iWwgo\u0026q=85\u0026s=eacd546258e1218dea6ff14f55e89b4c"},"favicon":{"light":"https://mintcdn.com/pearl-research/jPtzRu8ZOdp5WYZT/favicon/pearl-light.svg?fit=max\u0026auto=format\u0026n=jPtzRu8ZOdp5WYZT\u0026q=85\u0026s=97c85bf573b7866d8612883b555a32c7","dark":"https://mintcdn.com/pearl-research/jPtzRu8ZOdp5WYZT/favicon/pearl-dark.svg?fit=max\u0026auto=format\u0026n=jPtzRu8ZOdp5WYZT\u0026q=85\u0026s=9dc503cf63b998d03fa165c37e0921e1"},"api":{"playground":{"display":"interactive"},"examples":{"prefill":true,"autogenerate":false},"url":"full"},"appearance":{"default":"light","strict":true},"background":{"color":{"light":"#EFEEEB"}},"navbar":{"links":[{"href":"mailto:support@pearlresearch.ai","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://platform.pearlresearch.ai"}},"seo":{"metatags":{"canonical":"https://platform.pearlresearch.ai/docs"}},"fonts":{"heading":{"family":"Urbanist"},"body":{"family":"Inter"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"pearl-research","hasAudioNarration":false,"actualSubdomain":"pearl-research","customDomains":[],"gitSource":{"type":"github","owner":"duplex-foundation","repo":"cloud-platform-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6afac147dd50ae575c58a540"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aff1808a4a19f80cc241c5b","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"Docs","count":37},{"language":"default","tag":"Integrations","count":16},{"language":"default","tag":"Inference API","count":14},{"language":"default","tag":"API Reference","count":12},{"language":"default","tag":"Account \u0026 Billing","count":6},{"language":"default","tag":"Get Started","count":6},{"language":"default","tag":"Management API","count":5},{"language":"default","tag":"Guides","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":true},"customCss":[]}
{"page":{"pagePath":"reference/messages","slug":"/reference/messages","pageMetadata":{"title":"Messages","description":"Native Anthropic Messages responses and SSE events for compatible models.","deprecated":null,"version":null,"sidebarTitle":"Messages","openapi":"/openapi/inference.yaml post /messages","href":"/reference/messages","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Native Anthropic Messages responses and SSE events for compatible models.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,..._provideComponents(),...props.components},{Heading}=_components;if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Set the Anthropic SDK base URL to `,_jsx(_components.code,{children:`https://inference.pearlresearch.ai`}),`; the SDK adds the versioned path. Use the regional endpoint shown on `,_jsx(_components.a,{href:`https://platform.pearlresearch.ai/integrations`,children:`Integrations`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Errors use Anthropic’s shape, with the request ID in the body and in a `,_jsx(_components.code,{children:`request-id`}),` header; see the `,_jsx(_components.a,{href:`/reference/inference#anthropic`,children:`Inference API overview`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`reasoning`,children:`Reasoning`}),`\n`,_jsxs(_components.p,{children:[`Set the effort with `,_jsx(_components.code,{children:`\"output_config\": {\"effort\": \"high\"}`}),` (in the Python SDK, via `,_jsx(_components.code,{children:`extra_body`}),`). Levels a model doesn’t serve round up to the next one it does, as on the other formats. Send `,_jsx(_components.code,{children:`\"thinking\": {\"type\": \"disabled\"}`}),` to turn thinking off; GLM-5.3 and GLM-5.3-Flash always think and return `,_jsx(_components.code,{children:`400`}),`. Bound thinking with the effort or `,_jsx(_components.code,{children:`max_tokens`}),`, which covers the thinking and the answer. See `,_jsx(_components.a,{href:`/reasoning#effort-mapping`,children:`how effort levels map`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Messages","description":"Native Anthropic Messages responses and SSE events for compatible models.","deprecated":null,"version":null,"sidebarTitle":"Messages","openapi":"/openapi/inference.yaml post /messages","href":"/reference/messages","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Reasoning","slug":"reasoning","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createMessage","summary":"Messages","description":"Native Anthropic Messages responses and SSE events for compatible models.","security":["f00df42b-d90a-4de4-b833-e1d14b83a2ef","c7aebee5-87e3-4a35-9088-12f7e1bb0024"],"x-mint":{"href":"/reference/messages","metadata":{"sidebarTitle":"Messages"},"content":"Set the Anthropic SDK base URL to `https://inference.pearlresearch.ai`; the SDK adds the versioned path. Use the regional endpoint shown on [Integrations](https://platform.pearlresearch.ai/integrations).\n\nErrors use Anthropic's shape, with the request ID in the body and in a `request-id` header; see the [Inference API overview](/reference/inference#anthropic).\n\n## Reasoning {#reasoning}\n\nSet the effort with `\"output_config\": {\"effort\": \"high\"}` (in the Python SDK, via `extra_body`). Levels a model doesn't serve round up to the next one it does, as on the other formats. Send `\"thinking\": {\"type\": \"disabled\"}` to turn thinking off; GLM-5.3 and GLM-5.3-Flash always think and return `400`. Bound thinking with the effort or `max_tokens`, which covers the thinking and the answer. See [how effort levels map](/reasoning#effort-mapping).\n"},"parameters":["4efb602c-8d97-4da7-8f90-e222780f17e3"],"x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl https://inference.pearlresearch.ai/v1/messages \\\n -H \"x-api-key: $PEARL_API_KEY\" \\\n -H \"anthropic-version: 2023-06-01\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"model\":\"YOUR_MODEL_ID\",\"max_tokens\":8192,\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}]}'\n"}],"requestBody":"6492ede2-7df0-4371-8c90-40d4ec8c13f7","responses":{"200":"6b0ae119-0c3b-41cb-afed-40444026c467","400":"929b8b5c-3f97-4cf3-8f1b-6fe21755e3db","401":"d22d9325-7534-48cb-8bdd-a04715b46d5e","402":"3a138c04-8869-4d7f-a5e2-1ca3a0942443","403":"587fed78-7f47-4a00-929d-b868f684033a","404":"71a505bf-bc00-4a4e-acba-9743bd7720b9","413":"6cde5f50-eeb4-4a03-910d-0abb003b9929","429":"93f0d4bc-e155-4ba3-85ee-788498d36fc8","500":"3b151cd6-5a71-485b-8ef9-ea01508e2a7f","502":"b3c931ed-1da5-478d-8616-6257befc6d26","503":"6a300d3a-cebd-4428-b067-e6a8056b6824","504":"c52a1e4d-59bd-43ad-ac56-b7d406fd0df8","529":"018a4c8e-5d85-4fbc-b1f5-8736e493f8d5"},"method":"post","type":"path","servers":["f6c31a79-dad6-4767-a559-ec5cffb3ed6a"],"path":"/messages","baseUrlOptions":["https://inference.pearlresearch.ai/v1"],"title":"Messages","codeSamples":[{"label":"cURL","lang":"bash","source":"curl https://inference.pearlresearch.ai/v1/messages \\\n -H \"x-api-key: $PEARL_API_KEY\" \\\n -H \"anthropic-version: 2023-06-01\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"model\":\"YOUR_MODEL_ID\",\"max_tokens\":8192,\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}]}'\n"}],"requiredOnlyExamples":false,"disableCodeSampleGeneration":true,"requestExampleType":"codeSamples","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.model":"YOUR_MODEL_ID","body.max_tokens":8192,"body.messages.items.0.role":"user","body.messages.items.0.content.oneOf.0":"Hello"}],"urlDisplay":"full"},"dependencies":{"parameters":{"4efb602c-8d97-4da7-8f90-e222780f17e3":{"name":"anthropic-version","in":"header","required":true,"description":"One value, for example `2023-06-01`. Missing returns `400`.","schema":{"type":"string","example":"2023-06-01","isRequired":true,"description":"One value, for example `2023-06-01`. Missing returns `400`.","uniqueKey":"","typeLabel":"string"},"example":"2023-06-01"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","max_tokens","messages"],"properties":{"model":{"type":"string","description":"A chat model ID from `GET /models`. A model that doesn't serve Messages returns `404`.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"max_tokens":{"type":"integer","description":"Cap on generated tokens, thinking included.","isRequired":true,"uniqueKey":"max_tokens","typeLabel":"integer"},"messages":{"type":"array","description":"The conversation, alternating `user` and `assistant` turns. Content is a string or an array of blocks; replay returned `thinking` and `tool_use` blocks, and answer each tool use with a `tool_result` block carrying its ID.","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"],"uniqueKey":"messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","title":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"object","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX]","typeLabel":"object"},"title":"array","uniqueKey":"messages.items.[INDEX].content.oneOf.1","typeLabel":"array · object[]"}],"uniqueKey":"messages.items.[INDEX].content","typeLabel":"string | array · object[]"}},"uniqueKey":"messages.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"messages","typeLabel":"object[]"},"system":{"oneOf":[{"type":"string","title":"string","description":"The system prompt.","uniqueKey":"system.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"object","uniqueKey":"system.oneOf.1.items.[INDEX]","typeLabel":"object"},"title":"array","description":"The system prompt.","uniqueKey":"system.oneOf.1","typeLabel":"array · object[]"}],"uniqueKey":"system","typeLabel":"string | array · object[]"},"stream":{"type":"boolean","description":"Stream named server-sent events, see the `text/event-stream` response below.","uniqueKey":"stream","typeLabel":"boolean"},"output_config":{"type":"object","description":"`{\"effort\": …}`, the reasoning effort; see [Reasoning](#reasoning).","properties":{"effort":{"type":"string","uniqueKey":"output_config.effort","typeLabel":"string"}},"uniqueKey":"output_config","typeLabel":"object"},"thinking":{"type":"object","description":"`{\"type\": \"disabled\"}` turns thinking off. Thinking budgets (`budget_tokens`) are not supported by any model today and return `400`.","properties":{"type":{"type":"string","uniqueKey":"thinking.type","typeLabel":"string"}},"uniqueKey":"thinking","typeLabel":"object"},"tools":{"type":"array","description":"Tool definitions. Support varies by model.","items":{"type":"object","uniqueKey":"tools.items.[INDEX]","typeLabel":"object"},"uniqueKey":"tools","typeLabel":"object[]"},"tool_choice":{"type":"object","description":"The choice policy. Support varies by model.","uniqueKey":"tool_choice","typeLabel":"object"},"temperature":{"type":"number","description":"Sampling parameter.","uniqueKey":"temperature","typeLabel":"number"},"top_p":{"type":"number","description":"Sampling parameter.","uniqueKey":"top_p","typeLabel":"number"},"top_k":{"type":"number","description":"Sampling parameter.","uniqueKey":"top_k","typeLabel":"number"},"stop_sequences":{"type":"array","description":"Custom stop sequences.","items":{"type":"string","uniqueKey":"stop_sequences.items.[INDEX]","typeLabel":"string"},"uniqueKey":"stop_sequences","typeLabel":"string[]"}},"uniqueKey":"","typeLabel":"object"},"example":{"model":"YOUR_MODEL_ID","max_tokens":8192,"messages":[{"role":"user","content":"Hello"}]},"examples":{"Example":{"title":"Example","value":{"model":"YOUR_MODEL_ID","max_tokens":8192,"messages":[{"role":"user","content":"Hello"}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"6b0ae119-0c3b-41cb-afed-40444026c467":{"description":"The completion, or an event stream when streaming.","headers":{"X-Request-ID":{"description":"The request ID. Send your own UUID in `X-Request-ID` to use it as the ID. Include the ID when you contact support.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"},"request-id":{"description":"The request ID, the same as `X-Request-ID`.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Message ID.","uniqueKey":"id","typeLabel":"string"},"type":{"type":"string","enum":["message"],"description":"Always `message`.","uniqueKey":"type","typeLabel":"enum\u003cstring>"},"role":{"type":"string","enum":["assistant"],"description":"Always `assistant`.","uniqueKey":"role","typeLabel":"enum\u003cstring>"},"content":{"type":"array","description":"Content blocks: `text`, `thinking` on reasoning models, and `tool_use` when the model calls a tool.","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","thinking","tool_use"],"uniqueKey":"content.items.[INDEX].type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"content.items.[INDEX]","typeLabel":"object"},"uniqueKey":"content","typeLabel":"object[]"},"model":{"type":"string","description":"The model that served the request.","uniqueKey":"model","typeLabel":"string"},"stop_reason":{"type":"string","description":"Why generation stopped, for example `end_turn`, `max_tokens`, `stop_sequence`, or `tool_use`.","uniqueKey":"stop_reason","typeLabel":"string"},"stop_sequence":{"oneOf":[{"type":"string","description":"The stop sequence that matched, if any.","uniqueKey":"stop_sequence.oneOf.0","typeLabel":"string"},{"type":"null","description":"The stop sequence that matched, if any.","uniqueKey":"stop_sequence.oneOf.1","typeLabel":"null"}],"uniqueKey":"stop_sequence","typeLabel":"string | null"},"usage":{"type":"object","description":"`input_tokens` and `output_tokens`, what you're billed on, plus `cache_read_input_tokens` when the model reports cache reads.","properties":{"input_tokens":{"type":"integer","uniqueKey":"usage.input_tokens","typeLabel":"integer"},"output_tokens":{"type":"integer","uniqueKey":"usage.output_tokens","typeLabel":"integer"},"cache_read_input_tokens":{"type":"integer","uniqueKey":"usage.cache_read_input_tokens","typeLabel":"integer"}},"uniqueKey":"usage","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"message":{"title":"message","summary":"Message","value":{"id":"msg_…","type":"message","role":"assistant","model":"YOUR_MODEL_ID","content":[{"type":"text","text":"Hello! How can I help?"}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":9,"output_tokens":12}}}},"exampleType":"examples"},"text/event-stream":{"schema":{"type":"string","description":"With `stream: true` the response is Anthropic's named events: `message_start`, then per content block `content_block_start`, `content_block_delta`, and `content_block_stop`, then `message_delta` with the `stop_reason` and output usage, and finally `message_stop`. `ping` events may arrive at any point. Read through `message_stop` rather than waiting for an OpenAI `[DONE]`. An error after the stream has started arrives as an `error` event in Anthropic's error shape.","uniqueKey":"","typeLabel":"string"},"examples":{"eventOrder":{"title":"eventOrder","summary":"Event order (payloads elided)","value":"event: message_start\ndata: …\n\nevent: content_block_start\ndata: …\n\nevent: content_block_delta\ndata: …\n\nevent: content_block_stop\ndata: …\n\nevent: message_delta\ndata: …\n\nevent: message_stop\ndata: …"}},"exampleType":"examples"}},"exampleType":"examples"},"929b8b5c-3f97-4cf3-8f1b-6fe21755e3db":{"description":"Invalid request: a missing `anthropic-version` or JSON `Content-Type`, malformed JSON, a missing or wrongly typed field, or an unsupported thinking setting.","headers":{"X-Request-ID":{"description":"The request ID. Send your own UUID in `X-Request-ID` to use it as the ID. Include the ID when you contact support.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"},"request-id":{"description":"The request ID, the same as `X-Request-ID`.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}},"content":{"application/json":{"schema":{"type":"object","description":"Errors in Anthropic's shape, with the request ID in the body.","properties":{"type":{"type":"string","enum":["error"],"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"type":{"type":"string","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Present only when set, for example `no_capacity`.","uniqueKey":"error.code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"The request ID, also in the `request-id` header.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"missingAnthropicVersion":{"title":"missingAnthropicVersion","summary":"Missing anthropic-version","value":{"type":"error","error":{"type":"invalid_request_error","message":"missing anthropic-version header"},"request_id":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}}},"exampleType":"examples"}},"exampleType":"examples"},"d22d9325-7534-48cb-8bdd-a04715b46d5e":{"description":"Missing, unknown, revoked, or expired API key, a key over its credit limit, or a management key.","headers":{"X-Request-ID":{"description":"The request ID. Send your own UUID in `X-Request-ID` to use it as the ID. Include the ID when you contact support.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"},"request-id":{"description":"The request ID, the same as `X-Request-ID`.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}},"content":{"application/json":{"schema":{"type":"object","description":"Errors in Anthropic's shape, with the request ID in the body.","properties":{"type":{"type":"string","enum":["error"],"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"type":{"type":"string","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Present only when set, for example `no_capacity`.","uniqueKey":"error.code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"The request ID, also in the `request-id` header.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"unknownKey":{"title":"unknownKey","summary":"Unknown API key","value":{"type":"error","error":{"type":"authentication_error","message":"unknown API key"},"request_id":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}}},"exampleType":"examples"}},"exampleType":"examples"},"3a138c04-8869-4d7f-a5e2-1ca3a0942443":{"description":"Your organization is out of credits. Top up on the [Billing](https://platform.pearlresearch.ai/billing) page, then retry.","headers":{"X-Request-ID":{"description":"The request ID. Send your own UUID in `X-Request-ID` to use it as the ID. Include the ID when you contact support.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"},"request-id":{"description":"The request ID, the same as `X-Request-ID`.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}},"content":{"application/json":{"schema":{"type":"object","description":"Errors in Anthropic's shape, with the request ID in the body.","properties":{"type":{"type":"string","enum":["error"],"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"type":{"type":"string","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Present only when set, for example `no_capacity`.","uniqueKey":"error.code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"The request ID, also in the `request-id` header.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"outOfCredits":{"title":"outOfCredits","summary":"Out of credits","value":{"type":"error","error":{"type":"billing_error","message":"your organization is out of credits"},"request_id":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}}},"exampleType":"examples"}},"exampleType":"examples"},"587fed78-7f47-4a00-929d-b868f684033a":{"description":"Wrong endpoint for your organization's [inference region](/data-residency).","headers":{"X-Request-ID":{"description":"The request ID. Send your own UUID in `X-Request-ID` to use it as the ID. Include the ID when you contact support.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"},"request-id":{"description":"The request ID, the same as `X-Request-ID`.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}},"content":{"application/json":{"schema":{"type":"object","description":"Errors in Anthropic's shape, with the request ID in the body.","properties":{"type":{"type":"string","enum":["error"],"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"type":{"type":"string","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Present only when set, for example `no_capacity`.","uniqueKey":"error.code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"The request ID, also in the `request-id` header.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"wrongRegion":{"title":"wrongRegion","summary":"Wrong endpoint for the region","value":{"type":"error","error":{"type":"permission_error","message":"wrong endpoint for your organization's inference region"},"request_id":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}}},"exampleType":"examples"}},"exampleType":"examples"},"71a505bf-bc00-4a4e-acba-9743bd7720b9":{"description":"Unknown model (code `model_not_found`), or one this endpoint doesn't serve.","headers":{"X-Request-ID":{"description":"The request ID. Send your own UUID in `X-Request-ID` to use it as the ID. Include the ID when you contact support.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"},"request-id":{"description":"The request ID, the same as `X-Request-ID`.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}},"content":{"application/json":{"schema":{"type":"object","description":"Errors in Anthropic's shape, with the request ID in the body.","properties":{"type":{"type":"string","enum":["error"],"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"type":{"type":"string","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Present only when set, for example `no_capacity`.","uniqueKey":"error.code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"The request ID, also in the `request-id` header.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"unknownModel":{"title":"unknownModel","summary":"Unknown model","value":{"type":"error","error":{"type":"not_found_error","message":"unknown model"},"request_id":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}}},"exampleType":"examples"}},"exampleType":"examples"},"6cde5f50-eeb4-4a03-910d-0abb003b9929":{"description":"Request body over 20 MiB.","headers":{"X-Request-ID":{"description":"The request ID. Send your own UUID in `X-Request-ID` to use it as the ID. Include the ID when you contact support.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"},"request-id":{"description":"The request ID, the same as `X-Request-ID`.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}},"content":{"application/json":{"schema":{"type":"object","description":"Errors in Anthropic's shape, with the request ID in the body.","properties":{"type":{"type":"string","enum":["error"],"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"type":{"type":"string","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Present only when set, for example `no_capacity`.","uniqueKey":"error.code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"The request ID, also in the `request-id` header.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"bodyTooLarge":{"title":"bodyTooLarge","summary":"Body over 20 MiB","value":{"type":"error","error":{"type":"request_too_large","message":"request body over 20 MiB"},"request_id":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}}},"exampleType":"examples"}},"exampleType":"examples"},"93f0d4bc-e155-4ba3-85ee-788498d36fc8":{"description":"A [rate limit](/plans) for your organization and the model was reached. Wait for the `Retry-After` header's seconds.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-Request-ID":{"description":"The request ID. Send your own UUID in `X-Request-ID` to use it as the ID. Include the ID when you contact support.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"},"request-id":{"description":"The request ID, the same as `X-Request-ID`.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}},"content":{"application/json":{"schema":{"type":"object","description":"Errors in Anthropic's shape, with the request ID in the body.","properties":{"type":{"type":"string","enum":["error"],"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"type":{"type":"string","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Present only when set, for example `no_capacity`.","uniqueKey":"error.code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"The request ID, also in the `request-id` header.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"rateLimited":{"title":"rateLimited","summary":"Rate limit reached","value":{"type":"error","error":{"type":"rate_limit_error","message":"rate limit reached"},"request_id":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}}},"exampleType":"examples"}},"exampleType":"examples"},"3b151cd6-5a71-485b-8ef9-ea01508e2a7f":{"description":"Internal error. Safe to retry with backoff.","headers":{"X-Request-ID":{"description":"The request ID. Send your own UUID in `X-Request-ID` to use it as the ID. Include the ID when you contact support.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"},"request-id":{"description":"The request ID, the same as `X-Request-ID`.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}},"content":{"application/json":{"schema":{"type":"object","description":"Errors in Anthropic's shape, with the request ID in the body.","properties":{"type":{"type":"string","enum":["error"],"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"type":{"type":"string","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Present only when set, for example `no_capacity`.","uniqueKey":"error.code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"The request ID, also in the `request-id` header.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"internalError":{"title":"internalError","summary":"Internal error","value":{"type":"error","error":{"type":"api_error","message":"internal error"},"request_id":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}}},"exampleType":"examples"}},"exampleType":"examples"},"b3c931ed-1da5-478d-8616-6257befc6d26":{"description":"The model server failed or returned a malformed response. Retry with backoff.","headers":{"X-Request-ID":{"description":"The request ID. Send your own UUID in `X-Request-ID` to use it as the ID. Include the ID when you contact support.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"},"request-id":{"description":"The request ID, the same as `X-Request-ID`.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}},"content":{"application/json":{"schema":{"type":"object","description":"Errors in Anthropic's shape, with the request ID in the body.","properties":{"type":{"type":"string","enum":["error"],"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"type":{"type":"string","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Present only when set, for example `no_capacity`.","uniqueKey":"error.code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"The request ID, also in the `request-id` header.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"modelServerFailed":{"title":"modelServerFailed","summary":"Model server failed","value":{"type":"error","error":{"type":"api_error","message":"the model server failed"},"request_id":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}}},"exampleType":"examples"}},"exampleType":"examples"},"6a300d3a-cebd-4428-b067-e6a8056b6824":{"description":"Temporarily unavailable, for example during a deploy. Retry after the `Retry-After` header's seconds.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-Request-ID":{"description":"The request ID. Send your own UUID in `X-Request-ID` to use it as the ID. Include the ID when you contact support.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"},"request-id":{"description":"The request ID, the same as `X-Request-ID`.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}},"content":{"application/json":{"schema":{"type":"object","description":"Errors in Anthropic's shape, with the request ID in the body.","properties":{"type":{"type":"string","enum":["error"],"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"type":{"type":"string","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Present only when set, for example `no_capacity`.","uniqueKey":"error.code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"The request ID, also in the `request-id` header.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"unavailable":{"title":"unavailable","summary":"Temporarily unavailable","value":{"type":"error","error":{"type":"api_error","message":"temporarily unavailable"},"request_id":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}}},"exampleType":"examples"}},"exampleType":"examples"},"c52a1e4d-59bd-43ad-ac56-b7d406fd0df8":{"description":"The model server timed out. Retry with backoff.","headers":{"X-Request-ID":{"description":"The request ID. Send your own UUID in `X-Request-ID` to use it as the ID. Include the ID when you contact support.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"},"request-id":{"description":"The request ID, the same as `X-Request-ID`.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}},"content":{"application/json":{"schema":{"type":"object","description":"Errors in Anthropic's shape, with the request ID in the body.","properties":{"type":{"type":"string","enum":["error"],"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"type":{"type":"string","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Present only when set, for example `no_capacity`.","uniqueKey":"error.code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"The request ID, also in the `request-id` header.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"timedOut":{"title":"timedOut","summary":"Model server timed out","value":{"type":"error","error":{"type":"timeout_error","message":"the model server timed out"},"request_id":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}}},"exampleType":"examples"}},"exampleType":"examples"},"018a4c8e-5d85-4fbc-b1f5-8736e493f8d5":{"description":"No capacity for the model right now (code `no_capacity`). Retry with backoff.","headers":{"X-Request-ID":{"description":"The request ID. Send your own UUID in `X-Request-ID` to use it as the ID. Include the ID when you contact support.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"},"request-id":{"description":"The request ID, the same as `X-Request-ID`.","schema":{"type":"string"},"example":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}},"content":{"application/json":{"schema":{"type":"object","description":"Errors in Anthropic's shape, with the request ID in the body.","properties":{"type":{"type":"string","enum":["error"],"uniqueKey":"type","typeLabel":"enum\u003cstring>"},"error":{"type":"object","properties":{"type":{"type":"string","uniqueKey":"error.type","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"code":{"type":"string","description":"Present only when set, for example `no_capacity`.","uniqueKey":"error.code","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","description":"The request ID, also in the `request-id` header.","uniqueKey":"request_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"noCapacity":{"title":"noCapacity","summary":"No capacity","value":{"type":"error","error":{"type":"overloaded_error","message":"no capacity for the model right now","code":"no_capacity"},"request_id":"6f0b6e0a-6a8f-4c62-9b1e-3d2c1a0f9e87"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"f00df42b-d90a-4de4-b833-e1d14b83a2ef":{"xApiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your inference API key. Send this or `Authorization`; if you send both, they must carry the same key.","scopes":[],"schemeName":"xApiKey"}},"c7aebee5-87e3-4a35-9088-12f7e1bb0024":{"inferenceKey":{"type":"http","scheme":"bearer","description":"`Bearer` followed by an inference API key (`sk-prl-infapi-`). Create keys on the [API Keys](https://platform.pearlresearch.ai/api-keys) page. Management keys (`sk-prl-mgmt-`) cannot call models.","scopes":[],"schemeName":"inferenceKey"}}},"servers":{"f6c31a79-dad6-4767-a559-ec5cffb3ed6a":{"url":"https://inference.pearlresearch.ai/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"Your inference API key. Send this or `Authorization`; if you send both, they must carry the same key.","scopes":[],"schemeName":"xApiKey"},"schema":{"title":"x-api-key","type":"string","description":"Your inference API key. Send this or `Authorization`; if you send both, they must carry the same key.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"xApiKey","name":"x-api-key"}],"title":"xApiKey"},{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"`Bearer` followed by an inference API key (`sk-prl-infapi-`). Create keys on the [API Keys](https://platform.pearlresearch.ai/api-keys) page. Management keys (`sk-prl-mgmt-`) cannot call models.","scopes":[],"schemeName":"inferenceKey"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"`Bearer` followed by an inference API key (`sk-prl-infapi-`). Create keys on the [API Keys](https://platform.pearlresearch.ai/api-keys) page. Management keys (`sk-prl-mgmt-`) cannot call models.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"inferenceKey","name":"Authorization"}],"title":"inferenceKey"}]},"originalFileLocation":"openapi/inference.yaml"},"subdomain":"pearl-research","siteName":"Pearl Inference Platform","title":"Messages - Pearl Inference Platform","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-16T15:31:08.175Z","originalFileLocation":"reference/messages.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Native Anthropic Messages responses and SSE events for compatible models.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Pearl Inference Platform\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/pearl-research/k9be1f6J_artjsFA/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/pearl-research/k9be1f6J_artjsFA/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/pearl-research/k9be1f6J_artjsFA/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/pearl-research/k9be1f6J_artjsFA/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/pearl-research/k9be1f6J_artjsFA/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/pearl-research/k9be1f6J_artjsFA/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/pearl-research/k9be1f6J_artjsFA/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/pearl-research/k9be1f6J_artjsFA/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/pearl-research/k9be1f6J_artjsFA/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Messages - Pearl Inference Platform\">\u003cmeta data-mint-head property=\"og:description\" content=\"Native Anthropic Messages responses and SSE events for compatible models.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Pearl Inference Platform\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://platform.pearlresearch.ai/docs/reference/messages\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://pearl-research.mintlify.site/docs/_mintlify/api/og/v2?division=Inference+API\u0026amp;title=Messages\u0026amp;description=Native+Anthropic+Messages+responses+and+SSE+events+for+compatible+models.\u0026amp;theme=8053f473600c09a776e77e44\u0026amp;signature=538e9f7c3b247c92b9c6716876b6d6b001a42bd4c6a407c347b51934fbf7847c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Messages - Pearl Inference Platform\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Native Anthropic Messages responses and SSE events for compatible models.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://pearl-research.mintlify.site/docs/_mintlify/api/og/v2?division=Inference+API\u0026amp;title=Messages\u0026amp;description=Native+Anthropic+Messages+responses+and+SSE+events+for+compatible+models.\u0026amp;theme=8053f473600c09a776e77e44\u0026amp;signature=538e9f7c3b247c92b9c6716876b6d6b001a42bd4c6a407c347b51934fbf7847c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/pearl-research/k9be1f6J_artjsFA/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Pearl Inference Platform\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2A2623\">\u003clink data-mint-head rel=\"canonical\" href=\"https://platform.pearlresearch.ai/docs/reference/messages\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/reference/messages.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://platform.pearlresearch.ai/#organization\",\"name\":\"Pearl Inference Platform\",\"url\":\"https://platform.pearlresearch.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/pearl-research/qjVPdghcpi_iWwgo/logo/light.svg?fit=max\u0026auto=format\u0026n=qjVPdghcpi_iWwgo\u0026q=85\u0026s=a969569c61ca3aa40012ac0f3dbbe445\"}},{\"@type\":\"WebSite\",\"@id\":\"https://platform.pearlresearch.ai/docs#website\",\"name\":\"Pearl Inference Platform\",\"url\":\"https://platform.pearlresearch.ai/docs\",\"publisher\":{\"@id\":\"https://platform.pearlresearch.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://platform.pearlresearch.ai/docs/reference/messages#webpage\",\"url\":\"https://platform.pearlresearch.ai/docs/reference/messages\",\"name\":\"Messages\",\"description\":\"Native Anthropic Messages responses and SSE events for compatible models.\",\"dateModified\":\"2026-11-16T15:31:08.175Z\",\"isPartOf\":{\"@id\":\"https://platform.pearlresearch.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://platform.pearlresearch.ai/docs/reference/messages#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://platform.pearlresearch.ai/docs/reference/messages#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Inference API\",\"item\":\"https://platform.pearlresearch.ai/docs/reference/inference\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Messages\",\"item\":\"https://platform.pearlresearch.ai/docs/reference/messages\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://platform.pearlresearch.ai/docs/reference/messages#apireference\",\"headline\":\"Messages\",\"name\":\"Messages\",\"description\":\"Native Anthropic Messages responses and SSE events for compatible models.\",\"url\":\"https://platform.pearlresearch.ai/docs/reference/messages\",\"mainEntityOfPage\":{\"@id\":\"https://platform.pearlresearch.ai/docs/reference/messages#webpage\"},\"dateModified\":\"2026-11-16T15:31:08.175Z\",\"publisher\":{\"@id\":\"https://platform.pearlresearch.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://platform.pearlresearch.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Pearl Inference Platform\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Pearl Inference Platform\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/reference/messages.md","siteName":"Pearl Inference Platform","nav":{"global":null,"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":""}]},{"tab":"API Reference","groups":[{"group":"Inference API","pages":[{"title":"Overview","href":"/reference/inference"},{"title":"Chat completions","deprecated":null,"version":null,"sidebarTitle":"Chat completions","openapi":"/openapi/inference.yaml post /chat/completions","href":"/reference/chat-completions"},{"title":"Responses","description":"Stateless response creation with native JSON and SSE responses.","deprecated":null,"version":null,"sidebarTitle":"Responses","openapi":"/openapi/inference.yaml post /responses","href":"/reference/responses"},{"title":"Messages","deprecated":null,"version":null,"sidebarTitle":"Messages","openapi":"/openapi/inference.yaml post /messages","href":"/reference/messages"},{"title":"Count tokens","description":"Count a Messages request's input tokens without generating.","deprecated":null,"version":null,"sidebarTitle":"Count tokens","openapi":"/openapi/inference.yaml post /messages/count_tokens","href":"/reference/messages/count-tokens"},{"title":"Completions (legacy)","deprecated":null,"version":null,"sidebarTitle":"Completions (legacy)","openapi":"/openapi/inference.yaml post /completions","href":"/reference/completions"},{"title":"List models","deprecated":null,"version":null,"sidebarTitle":"List models","openapi":"/openapi/inference.yaml get /models","href":"/reference/models"}]},{"group":"Management API","pages":[{"title":"Overview","href":"/reference/management"},{"title":"Rate limits","href":"/reference/management/rate-limits"},{"title":"Get credits","deprecated":null,"version":null,"sidebarTitle":"Credits","openapi":"/openapi/management.yaml get /credits","href":"/reference/management/credits"},{"title":"Get current API key","deprecated":null,"version":null,"sidebarTitle":"Current API key","openapi":"/openapi/management.yaml get /key","href":"/reference/management/key"},{"title":"Get activity","deprecated":null,"version":null,"sidebarTitle":"Activity","openapi":"/openapi/management.yaml get /activity","href":"/reference/management/activity"}]}]}]},"basePath":"","title":"Messages - Pearl Inference Platform","deploymentId":"dpl_53YqbBPsHdrqSGqXiWPGU7csRVod","buildId":"dpl_53YqbBPsHdrqSGqXiWPGU7csRVod","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Ku9dSkH0.js","snippetPresets-Cjez4eet.js","utils-BqNa-fnS.js","style-to-object-BY3JEAdk.js","utils-DiE92JCe.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-Bi0DpqVf.js","conditional-requirements-CFM0id0Q.js","cloneDeep-C6xnxscF.js","_Uint8Array-B7g0OYAt.js","isObject-FP1Yky1u.js","ApiExamples-Bf8Ecb5t.js","usePlaygroundInputsStore-BA942cq6.js","shallow-D0sePNkF.js","isEqual-CnnQO8sL.js","CodeSnippets-BTANoy1T.js","CodeSnippet-CTZvgJfu.js","getApiPlaygroundDisplay-BK2o1XYu.js","Page--B9YZ09u.js","DynamicMarkdown-CsgNpZb1.js","SectionHeading-C3K437Dy.js","icon-DlxjjqnB.js","MethodPill-Cr7Ib9nN.js","getPastedJson-DXo3wtHt.js","Check2Icon-ChEI-f_B.js","axios-CsQoIw0U.js","Markdown-CH4mv0N8.js","AssistantPageLink-BHjmqccN.js","dist-DYCPzQwJ.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}