Skip to content
Good MorningDocs
Dashboard

Create a message (Anthropic Messages API)

POST
/messages
curl --request POST \
--url https://api.saygm.com/v1/messages \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{}'

Anthropic-compatible Messages API. Use the Anthropic SDK with base_url set to https://api.saygm.com; the request and response bodies match the Anthropic Messages schema. Pass the GM API key using Anthropic’s native x-api-key header.

Media typeapplication/json
object
Examplegenerated
{}

An Anthropic Messages object, or a text/event-stream when stream is true.

object
Examplegenerated
{}

Invalid request (e.g. unknown model).

Media typeapplication/json
object
error
object
message
string
type
string
code
string | null
Examplegenerated
{
"error": {
"message": "example",
"type": "example",
"code": "example"
}
}