Nebula Agent chat completions

POST /chat/completions
CreateChatCompletion

Creates an OpenAI-compatible, stateless Nebula Agent completion. Available on Free and charged from the same account credit balance as the web Agent and other public endpoints, using the same variable token, model-cost, and tool-call calculation. Send the complete conversation in messages on every request. REST and CLI support streaming. This operation is deliberately excluded from MCP and the ChatGPT and Claude plugins, which provide the market-data tools used by their host models.

Parameters

No parameters for this endpoint.

cURL Example

curl --request POST \
  --url 'https://nebula-api.hiddensystems.ai/api/v1/public/chat/completions' \
  --header 'X-API-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "messages": [
    {
      "content": "What changed in NVIDIA sentiment this week?",
      "role": "user"
    }
  ],
  "stream": false,
  "thinking_mode": "auto"
}'

Responses

200 OK
400 Bad Request
401 Unauthorized
402 Credit balance exhausted
403 Forbidden
404 Not Found
429 Too Many Requests
500 Internal Server Error
503 Service Unavailable

Media type application/json

choices
array<object> required

Generated completion choices.

choices[].delta
object optional

Streaming message fragment.

choices[].delta.content
string optional

Partial assistant response text in this stream fragment.

choices[].delta.role
string optional

Conversation role when emitted in this stream fragment.

choices[].finish_reason
string optional

Reason generation stopped when available.

choices[].index
integer required

Zero-based index of the generated completion choice.

choices[].message
object optional

Completed assistant message for a non-streaming response.

choices[].message.content
string required

Completed assistant response text.

choices[].message.role
string required

Conversation role of the completed message.

created
integer (int64) required

Unix timestamp when the completion was created.

id
string required

Unique identifier assigned to the chat completion.

model
string required

Nebula agent model identifier.

object
string required

OpenAI-compatible object type.

usage
object optional

Credits consumed by this completion.

usage.credits_used
integer (int64) required

Nebula credits consumed by the request.

{
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "NVIDIA sentiment strengthened this week as data-centre demand dominated discussion.",
        "role": "assistant"
      }
    }
  ],
  "created": 1786114800,
  "id": "chatcmpl_nebula_01",
  "model": "nebula-agent",
  "object": "chat.completion",
  "usage": {
    "credits_used": 10
  }
}