POST /v1/api/messages
Supports text conversation history, client-executed tool calls/results and incremental streaming. Uses dashboard keys and permitted owned machines. Anthropic does not officially support non-Claude gateway models; API-format compatibility does not establish model behavior. Image/document input is unavailable here; media generation uses the B3IQ media MCP. Request bodies are limited to 1 MiB.

Authentication

Bearer Token (b3iq_gateway)

Header Parameters

x-b3iq-node-id string optional header
Optional permitted owned-machine pin. Competing pins must agree.

Request Body required

application/json
model string REQUIRED
messages object[] REQUIRED
Array of: object
system string | object[]
One of:
Option 1string
Option 2
Array of: object
tools object[]
Array of: object
stream boolean
max_tokens integer REQUIRED

Responses

200 A Messages object or incremental Messages event stream.
application/json
object
default An Anthropic-shaped error; status identifies auth, scope, size, quota or upstream failures.
curl -X POST 'https://b3iq.org/v1/api/messages' \  -H 'Authorization: Bearer YOUR_API_TOKEN' \  -H 'Content-Type: application/json' \  -d '{  "model": "string",  "messages": [    {}  ],  "system": "string",  "tools": [    {}  ],  "stream": true,  "max_tokens": 1}'
const response = await fetch('https://b3iq.org/v1/api/messages', {  method: 'POST',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN",      "Content-Type": "application/json"  },  body: JSON.stringify({    "model": "string",    "messages": [      {}    ],    "system": "string",    "tools": [      {}    ],    "stream": true,    "max_tokens": 1  })});const data = await response.json();console.log(data);
200 Response
"<object>"
Ask a question... ⌘I