HyphenHyphen
HomeConsole
  • Get Started
  • Connect your coding agent
  • Build with Hyphen
  • Chat UIs & automation
  • Recipes
  • Guides
  • API Reference
Information
Chat
    Create a chat completionpost
Responses
    Create a model response (Responses API)post
Messages
    Create a message (Anthropic Messages API)post
Models
    List available modelsget
Schemas
powered by Zudoku
Hyphen Gateway API
Hyphen Gateway API

Chat

OpenAI Chat Completions — the default surface.


Create a chat completion

POST
https://api.hyphen-solution.com
/v1/chat/completions

OpenAI-compatible Chat Completions endpoint. This is the default surface spoken by the OpenAI SDK, Cursor, Cline, Aider, Continue, Hermes and most OpenAI-compatible clients.

Create a chat completion › Request Body

ChatCompletionRequest
model
​Model · enum · required

A model ID from the current catalog — real provider model names, all MiniMax. The core tiers are minimax-m3 (flagship), minimax-m2.7 (balanced daily driver) and minimax-m2.5 (fast); the -highspeed variants are latency-tuned versions of their standard siblings at roughly 2x the price; minimax-m2.1 and minimax-m2 are older M-series generations; minimax-m2-her is role-play/dialogue chat tuning; minimax-text-01 is the long-context text model. There are no invented aliases; any other ID returns an error. The catalog can change with notice.

Enum values:
minimax-m3
minimax-m2.7
minimax-m2.7-highspeed
minimax-m2.5
minimax-m2.5-highspeed
minimax-m2.1
minimax-m2.1-highspeed
minimax-m2
​ChatMessage[] · required

The conversation so far — an array of role/content messages, oldest first.

max_tokens
​integer · min: 1

Maximum number of tokens to generate in the completion.

temperature
​number · min: 0 · max: 2

Sampling temperature. Lower is more deterministic, higher is more creative. Alter this or top_p, not both.

Default: 1
top_p
​number · min: 0 · max: 1

Nucleus sampling — only tokens in the top top_p probability mass are considered. Alter this or temperature, not both.

Default: 1
n
​integer · min: 1

Number of completion choices to generate per request.

Default: 1
stream
​boolean

Set true for a Server-Sent Events stream of deltas.

Default: false
​

Up to 4 sequences where generation stops (string or array).

Example: ["\n\n"]
frequency_penalty
​number · min: -2 · max: 2

Penalize tokens by how often they already appeared — positive values reduce verbatim repetition.

Default: 0
presence_penalty
​number · min: -2 · max: 2

Penalize tokens that appeared at all — positive values push toward new topics.

Default: 0
​Tool[]

Function tools the model may call. Supported — the gateway passes tool definitions and tool-call turns through to the upstream model.

​

Controls tool use. auto (the default) and none are honoured by the M-series. required and the named-function object are accepted by the API but ignored by the model, which decides for itself. Tested 2026-07-26. Design for a model that chooses, and always handle a turn with no tool call.

Create a chat completion › Responses

A chat completion.

ChatCompletionResponse
id
​string
object
​string
created
​integer

Unix timestamp (seconds).

model
​string

The model that actually served the request. During a provider incident this may be a smaller model of the same family as the one you requested.

​object[]

One entry per requested choice (n).

​Usage

Token usage in Chat Completions shape.

POST/v1/chat/completions
curl https://api.hyphen-solution.com/v1/chat/completions \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "model": "minimax-m3", "messages": [ { "role": "user", "content": "Say hello in one sentence." } ] }'
Example Request Body
{ "model": "minimax-m3", "messages": [ { "role": "user", "content": "Say hello in one sentence." } ] }
json
application/json
Example Responses
{ "id": "chatcmpl-9f8e7d6c5b4a", "object": "chat.completion", "created": 1753142400, "model": "minimax-m3", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Hello — great to meet you!" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 12, "completion_tokens": 8, "total_tokens": 20 } }
json
application/json

Responses