API reference
Documentation.
The API implements the OpenAI Chat Completions interface. Existing clients work once the base URL and API key are changed.
- base url
- https://api.nonalignment.si/v1
- models
- deepseek-v4.1-flash-abliterated / glm-5.3-abliterated
- auth
- Authorization: Bearer na-…
API keys
Sign in on the dashboard, choose a plan or purchase credits, and create a key. Each key is displayed once; only its hash is stored.
Quickstart
curl https://api.nonalignment.si/v1/chat/completions \
-H "Authorization: Bearer $NA_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4.1-flash-abliterated",
"messages": [{"role": "user", "content": "Hello"}]
}'opencode
Add the configuration below to ~/.config/opencode/opencode.jsonc, or to opencode.jsonc in a project, and set NA_KEY in your environment. Select a model with /models.
{
"$schema": "https://opencode.ai/config.json",
"model": "nonalignment/deepseek-v4.1-flash-abliterated",
"providers": {
"nonalignment": {
"name": "NonAlignment",
"env": ["NA_KEY"],
"package": "@opencode/ai/providers/openai-compatible",
"settings": {
"baseURL": "https://api.nonalignment.si/v1"
},
"models": {
"deepseek-v4.1-flash-abliterated": { "name": "DeepSeek V4.1 Flash" },
"glm-5.3-abliterated": { "name": "GLM 5.3" }
}
}
}
}Endpoints
- POST /v1/chat/completions — streaming, tool calls, reasoning
- GET /v1/models — availability and pricing
Reasoning and tools
Reasoning is streamed separately from the answer, in its own field on each delta. Clients that do not support it can ignore it. Tool calls use the OpenAI tools and tool_calls format. Set stream_options.include_usage to receive token counts at the end of a stream.
Models
Pass the catalog ID in model. GET /v1/models returns availability, pricing and pricing_status for each model; models not yet deployed are listed as unavailable. To toggle reasoning, DeepSeek reads chat_template_kwargs.thinking and GLM reads chat_template_kwargs.enable_thinking.
Billing
Requests are billed per input, cached-input and output token at the rates in the models table. Usage is deducted from the credit balance, which monthly plans top up at each renewal and one-off purchases add to. Credits do not expire. If a stream is interrupted, generation stops and the tokens produced are billed. Where the backend reports no usage, the gateway estimates token counts from character length and marks the record as estimated.
Rates are provisional until deployment benchmarks are complete. Chat on the website uses the same gateway and rates, and requires a monthly plan.
Errors
| 401 | invalid_api_key | The key is missing, malformed or revoked. |
| 402 | insufficient_quota | The credit balance does not cover the request's maximum cost. |
| 404 | model_not_found | Unknown model ID. See GET /v1/models. |
| 413 | too_large | The request body exceeds 16 MB. |
| 429 | concurrency | Too many concurrent requests on the account. |
| 429 | rate_limit | Requests-per-minute limit reached. Retry after the interval in Retry-After. |
| 502 | upstream_unreachable | The inference backend is unavailable. Retry with backoff. |
| 503 | model_unavailable | The model is not yet deployed or priced. |
| 504 | upstream_timeout | The backend did not respond within the deadline. |