Skip to main content
POST
/
responses
Create a response
curl --request POST \
  --url https://api.neosantara.xyz/v1/responses \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "nusantara-base",
  "input": "<string>",
  "instructions": "<string>",
  "previous_response_id": "<string>",
  "store": true,
  "reasoning": {
    "effort": "low"
  },
  "text": {
    "format": {
      "type": "text",
      "schema": {}
    }
  },
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "<string>",
        "description": "<string>",
        "parameters": {}
      }
    }
  ],
  "tool_choice": "<string>"
}'
{
  "id": "<string>",
  "type": "message",
  "role": "assistant",
  "model": "<string>",
  "output": [
    {
      "type": "output_text",
      "text": "<string>"
    }
  ],
  "usage": {
    "input_tokens": 123,
    "output_tokens": 123
  },
  "_metadata": {
    "creator": "noesantara.xyz",
    "status": true,
    "timestamp": "2023-11-07T05:31:56Z",
    "request_id": "<string>",
    "processing_time": 123,
    "tier": "<string>",
    "user_total_usage": {
      "used": 123,
      "limit": 123,
      "remaining": 123,
      "reset_at": "2023-11-07T05:31:56Z"
    }
  }
}

Authorizations

Authorization
string
header
required

Your NeosantaraAI API Key.

Body

application/json
model
string
Example:

"nusantara-base"

input
instructions
string

System-level instructions for the model.

previous_response_id
string

ID of the previous response to continue a conversation.

store
boolean
default:true
reasoning
object
text
object
tools
object[]
tool_choice

Response

Successful response

id
string
type
string
Example:

"message"

role
string
Example:

"assistant"

model
string
output
object[]
  • Option 1
  • Option 2
usage
object
_metadata
object