API reference

Chat Completions

CHUA ONE is CHUA’s AI model API platform. This documentation covers its public API endpoints and request requirements. Visit CHUA

GPT Image 2 image API
Endpoint
POST https://chuaone.si/v1/chat/completions
Authentication
Authorization: Bearer $CHUA_API_KEY
Idempotency
Idempotency-Key
Output limit
max_tokens
Response receipt
X-CHUA-Request-ID

Coding tools

Connect Codex and Claude Code directly with a project API key. Text and function tools use the same model permissions, budgets, request records and billing as Chat Completions. Unsupported input types and parameters return an explicit error.

Codex
POST /v1/responses
Claude Code
POST /v1/messagesRequired header: anthropic-version: 2023-06-01
Key-scoped models
GET /v1/models
curl 'https://chuaone.si/v1/messages' \
  -H "Authorization: Bearer $CHUA_API_KEY" \
  -H 'anthropic-version: 2023-06-01' \
  -H 'Idempotency-Key: YOUR_UNIQUE_REQUEST_ID' \
  -H 'Content-Type: application/json' \
  -d '{"model":"YOUR_ALLOWED_MODEL","max_tokens":256,"messages":[{"role":"user","content":"Hello"}]}'

Request outcomes

2xx
Read the complete response and its request receipt.
409
The idempotency key was already recorded. Check the existing request; do not resend automatically.
Timeout / disconnect
Response delivery and billing may differ. The workspace ledger is authoritative.
Open request records

Exact model failures

CHUA ONE does not silently switch to another model.

TOKEN_HUB_CROSS_MODEL_FALLBACK_DETECTED
A cross-model fallback was detected and rejected.
TOKEN_HUB_UPSTREAM_MODEL_MISMATCH
The upstream model did not match the requested model.