Nebul Docs

Chat Completion

POST
/v1/chat/completions

Follows the exact same API spec as OpenAI's Chat API https://platform.openai.com/docs/api-reference/chat

curl -X POST https://api.inference.nebul.io/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-1234" -d '{    "model": "openai/gpt-oss-120b",    "messages": [        {            "role": "user",            "content": "Hello!"        }    ]}'

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

application/json

curl -X POST "https://example.com/v1/chat/completions" \  -H "Content-Type: application/json" \  -d '{    "model": "string",    "messages": [      {        "role": "user",        "content": "string"      }    ]  }'
null