Skip to content

03 / API

An API for your agents and tools

OpenAI- and Anthropic-compatible, with unlimited tokens. Connect coding agents, scripts and apps to the same session you use in the chat. Long prompts and many requests do not change the hourly price.

What you get

  • Up to 12 requests at once, shared between the API and the web app.
  • Streaming, tool calls and image input.
  • A context of up to 65,536 tokens.
  • One model, served by us. Requests are never routed to other companies.
  • Request bodies are never stored.

Endpoints

https://api.nonex.ai/v1

EndpointWhat it does
POST /v1/chat/completionsOpenAI-compatible chat completions
POST /v1/messagesAnthropic-compatible messages
GET /v1/modelsThe model you can use
GET /v1/runtimeSession status
POST /v1/runtime/startStart a session (the clock starts when it is ready)
POST /v1/runtime/stopEnd the session

Authentication

Create a key on the API keys page in the app and send it as a Bearer token. Anthropic clients can send it as x-api-key instead.

The session must be online

The API answers while your session is online. Start it from the app or with POST /v1/runtime/start; billing is the same either way.

Thinking effort

The model thinks before it answers. Set reasoning_effort (none, minimal, low, medium, high or xhigh) on /v1/chat/completions, or thinking (disabled, or enabled with budget_tokens) and output_config.effort on /v1/messages. none or disabled answers right away; low caps thinking at about 1,000 tokens, medium at about 4,000, and high keeps a quarter of max_tokens for the answer. Requests with tools get the effort but no hard cap. Without these fields the model thinks as long as it needs.

Examples

curl
curl https://api.nonex.ai/v1/chat/completions \
  -H "Authorization: Bearer $NONEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "nonex-1", "stream": true,
       "messages": [{"role": "user", "content": "Hello"}]}'
Python (OpenAI SDK)
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.nonex.ai/v1",
    api_key=os.environ["NONEX_API_KEY"],
)
reply = client.chat.completions.create(
    model="nonex-1",
    messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)

Coding agents

Any tool that lets you set an OpenAI-compatible base URL works: Cline, Aider, OpenCode, Continue and others. For Claude Code, point it at the Anthropic-compatible endpoint:

Claude Code
export ANTHROPIC_BASE_URL=https://api.nonex.ai
export ANTHROPIC_AUTH_TOKEN=$NONEX_API_KEY
export ANTHROPIC_MODEL=nonex-1
claude

Connect your agents.

Create a key in the app, start a session and point any OpenAI- or Anthropic-compatible client at nonex.