Nebula Agent chat completions

POST /chat/completions
CreateChatCompletion

An OpenAI-compatible, stateless Nebula Agent completion: send the whole conversation each time. OpenAI SDKs work unchanged, and model is ignored. Charged by usage with a 10-credit minimum; usage.credits_used reports the charge. stream: true streams server-sent events. Not available over MCP.

Wallet payment is not available for this operation; use account authentication. x402 payment guide.

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 Credits used up; response includes renewal timing and purchased credit balance
403 Forbidden
404 Not Found
405 Method not allowed; the Allow header lists the supported method
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
  }
}