POST
/
reasoning
Reasoning completion
curl --request POST \
  --url https://api.neosantara.xyz/v1/reasoning \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "nusantara-base",
  "messages": [
    {
      "role": "system",
      "content": "<string>",
      "name": "<string>",
      "tool_call_id": "<string>"
    }
  ],
  "temperature": 0.7,
  "max_tokens": 1500,
  "stream": false,
  "top_p": 1,
  "frequency_penalty": 0,
  "presence_penalty": 0,
  "response_format": {
    "type": "text"
  }
}'
{
  "id": "reasoning-cmpl-123",
  "object": "chat.completion",
  "created": 1717950000,
  "model": "nusantara-base",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "First, calculate total distance: 120km + 180km = 300km. Next, calculate total time: 2h + 3h = 5h. Finally, average speed = total distance / total time = 300km / 5h = 60 km/h."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 30,
    "completion_tokens": 50,
    "total_tokens": 80
  }
}

Authorizations

Authorization
string
header
required

Your NeosantaraAI API Key.

Body

application/json

Response

200
application/json

Reasoning completion result

The response is of type object.