Nebul Docs

Create a Message (Anthropic-compatible)

POST
/v1/messages

Anthropic Messages API-compatible endpoint. Point Anthropic SDKs at https://api.inference.nebul.io as the base URL. The model in the body selects and authorizes the target model; prompts pass the platform guardrails.

Authorization

X-API-Key<token>

Project-scoped Nebul API key. Also accepted as Authorization: Bearer <key>.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/messages" \  -H "Content-Type: application/json" \  -d '{    "model": "string",    "messages": [      {        "role": "user",        "content": "string"      }    ],    "max_tokens": 0  }'
{  "id": "string",  "type": "message",  "role": "assistant",  "model": "string",  "content": [    {}  ],  "stop_reason": "string",  "usage": {    "input_tokens": 0,    "output_tokens": 0  }}