Skip to main content
POST
/
v1
/
chat-completion
Chat Completion (Non-Streaming)
curl --request POST \
  --url https://api.incredible.one/v1/chat-completion \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "small-1",
  "messages": [
    {
      "role": "user",
      "content": "Hello, Incredible!"
    }
  ]
}'
{
  "result": {
    "response": [
      {
        "content": "Hello! 👋",
        "role": "assistant"
      }
    ],
    "thinking": "Greet the user briefly."
  }
}

Request

Send a POST request with your prompt and options. Set stream: true to receive Server‑Sent Events (SSE), or omit stream for a single JSON response (default).
curl -X POST "https://api.incredible.one/v1/chat-completion" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "small-1",
    "messages": [
      { "role": "user", "content": "Hello, Incredible!" }
    ]
  }'

Request Body

  • model string — Model identifier (e.g., small-1).
  • messages array — Conversation history; at least one user message is required.
  • system string (optional) — System prompt defining assistant behavior.
  • stream boolean (optional) — Set true for SSE streaming; omit to get a single JSON response (default false).

Responses

stream = true (SSE)

data: {"content": {"type": "text_chunk", "content": "Hello"}}
data: {"content": {"type": "function_call", "function_call_id": "...", "function_calls": []}}
data: {"content": "[DONE]"}
See also: Chat Completion (Streaming).

Non‑streaming (default, JSON)

{
  "result": {
    "response": [
      {
        "content": "Hello! 👋",
        "role": "assistant"
      }
    ],
    "thinking": "Greet the user briefly."
  }
}

Body

application/json
model
string
required

The model to use for chat completion

Example:

"small-1"

messages
object[]
required

Array of message objects that make up the conversation

system
string
default:You are a helpful assistant.

The system prompt that defines the AI's behavior

stream
boolean
default:false

Whether to return a streaming response

Response

Chat completion response

result
object
required

Structured chat completion result