SumoRouter
SumoRouter Customer API

Playground

Server

Dashboard playground; same gateway as the AI API, but authenticated with the session and billed to the user.


Playground chat completion

POST
https://ai.brandkamu.id
/api/playground/chat/completions

Same as POST /v1/chat/completions but authenticated with the session and billed to the user directly (no key limits). Logged with source: playground. Rate-limited at the per-key requests-per-minute limit. At most 20 inline images per request, each up to 10 MB (encoded).

When streaming, after the upstream stream (including its data: [DONE]) one extra event reports the billed usage: data: {"object":"sumorouter.billing","usage":{"prompt_tokens":…,"completion_tokens":…,"cached_tokens":…,"cache_write_tokens":…,"cost":<USD>}}.

Playground chat completion › Request Body

OpenAI Chat Completions request. Only the commonly used fields are listed; other OpenAI fields are passed through.
model
​string · required

Model slug from GET /v1/models (a model with mode chat).

​ChatMessage[] · minItems: 1 · required
stream
​boolean

Stream server-sent events. stream_options.include_usage is forced on.

Default: false
max_tokens
​integer

Output limit; lowered automatically when your credit can't cover it.

max_completion_tokens
​integer

Output limit (preferred over max_tokens when both are set); lowered automatically when your credit can't cover it.

temperature
​number
top_p
​number
n
​integer

Number of choices; each is reserved and billed.

​
seed
​integer
presence_penalty
​number
frequency_penalty
​number
​object[]

Function tools. Provider-hosted tools (web search, code interpreter, MCP, …) are refused.

​
parallel_tool_calls
​boolean
​object

{"type":"json_object"} or a json_schema.

reasoning_effort
​string

low, medium or high on models with supports_reasoning.

logprobs
​boolean
top_logprobs
​integer
​object

Playground chat completion › Responses

The completion (JSON) or an SSE stream.

OpenAI `chat.completion` object. `model` is the catalog slug; `usage.cost` is the billed amount in USD.
id
​string
object
​string
created
​integer
model
​string
​object[]
​object

Playground decision

POST
https://ai.brandkamu.id
/api/playground/decisions

Same as POST /v1/decisions, authenticated with the session and billed to the user.

Playground decision › Request Body

model
​string · required
​required

The text to judge, or messages with input_text parts.

​object[] · required

Questions of type predicate, choice (with choices) or score (with levels). Answers come back in the same order.

Playground decision › Responses

Answers.

model
​string
​object[]
​object