Skip to main content
POST
Messages API
GregAPI is compatible with the Anthropic Messages API and can be used directly with the official SDK or cURL. Requests must carry the anthropic-version header:

Request examples

cURL

Python SDK

TypeScript SDK

Building approaches

  1. Make your first call: configure environment variables and send the first request with cURL or an SDK.
  2. Understand the Messages API: learn the messages structure, multi-turn conversations, and stop_reason.
  3. Choose a model: confirm available models via GET /v1/models or the console.
  4. Extend capabilities: tool calling, vision, and structured output follow the official Anthropic documentation.

Resources

  • GregAPI console: create and manage API keys, and review usage and quotas.
  • GregAPI documentation: platform capabilities and multi-product navigation.
Gateway behavior is subject to the GregAPI console; native Anthropic capabilities follow the official documentation.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

anthropic-version
string
required

Anthropic API version

Example:

"2023-06-01"

Body

application/json
model
string
required

Model name

max_tokens
integer
required

Maximum output tokens

messages
object[]
required

Conversation messages

Response

200

Successful message response