Skip to main content
The Claude Messages API lets you interact with Claude and GPT models using the native Anthropic request format. It is fully compatible with the official Anthropic SDK and documentation, so you can point your existing Anthropic integrations at GlobalAI OPC with minimal changes. Base URL: http://apillm.globalaiopc.com/gw_llm_power Endpoint: POST /v1/messages

Authentication

Authenticate every request using the Authorization header with your API key:

Supported Models

Claude Models

GPT Models (via Claude Protocol)

GPT models are also accessible through the Claude Messages API using the same request format.
GPT models accessed through this endpoint do not support image analysis. For image input with GPT models, use the OpenAI Chat API endpoint instead.

Model Suffix Reference

Request Parameters

string
required
The name of the model to use. For example: claude-opus-4-6, claude-sonnet-4-5, or gpt-5.5.
integer
required
The maximum number of tokens the model may generate in its response. This field is required by the Claude protocol.
array
required
An array of message objects representing the conversation history, following the Claude Messages protocol.
string
required
The role of the message author. Accepted values: user or assistant.
string | array
required
The content of the message. Pass a plain text string for standard text input, or a Claude native content block array for multimodal input.
string
An optional system prompt that sets the context and behavior for the model throughout the conversation.
boolean
When set to true, the response is returned as a stream of Claude-style SSE events.
number
Controls the randomness of the model’s output. Lower values produce more focused, deterministic responses; higher values produce more varied output.

Response Fields

string
A unique identifier for the message response.
string
The type of the returned object. Always message.
string
The role of the generated message. Always assistant.
string
The type of the content block. Typically text for standard text responses.
string
The text content generated by the model.
string
The reason the model stopped generating. Common values include end_turn (natural end) and max_tokens (token limit reached).
integer
The number of tokens in the input messages and system prompt.
integer
The number of tokens in the generated response.

Code Examples

Example Response

This endpoint is fully compatible with the Anthropic Messages API protocol. For complete details on request options — including extended thinking, tool use, and vision — refer to the Anthropic Messages API documentation.