Skip to main content
POST
Messages API
The /v1/messages endpoint provides an Anthropic Messages API-compatible interface for text generation. Use the same request format as the Anthropic Messages API — swap the base URL to https://api.unifically.com and pass any supported model ID in the model field.
All LLM models support this endpoint, including Cursor, OpenAI, and Anthropic models.

Create Message

POST /v1/messages

Request

Request Parameters

model
string
required
Model identifier in provider/model-name format. See Available LLM Models.
max_tokens
integer
required
Maximum number of tokens to generate before stopping.
messages
array
required
Array of message objects with role (user or assistant) and content (string or content blocks array).
system
string | array
System prompt providing context and instructions to the model.
stream
boolean
If true, the response is streamed using server-sent events. Default: false.
temperature
number
Sampling temperature between 0 and 1.
top_p
number
Nucleus sampling parameter. Use either temperature or top_p, not both.
stop_sequences
array
Custom sequences that cause the model to stop generating.
tools
array
Definitions of tools the model may use. Each tool includes name, description, and input_schema.
tool_choice
object
Controls tool usage. Default: { "type": "auto" }.

System Prompt Example

Response

Streaming Response

When stream: true, the API returns text/event-stream with Anthropic-compatible event types (message_start, content_block_delta, message_stop, etc.):

Supported Models

See individual model pages under LLM Models for details.

SDK Compatibility

Point the Anthropic SDK at Unifically by changing the base URL: