GET /docs
Human-readable documentation generated from the same manifest as the OpenAPI and Postman exports.
Response example
<!doctype html>...{{proxyApiKey}}.https://ai-api1.cus.cxProxy endpoints accept x-api-key, anthropic-api-key, api-key, or Authorization: Bearer {{proxyApiKey}}. Admin endpoints use the ccp_admin_session cookie created by /ui/api/auth/setup or /ui/api/auth/login.
Human-readable documentation generated from the same manifest as the OpenAPI and Postman exports.
<!doctype html>...OpenAPI 3.0.3 JSON for Postman, Swagger UI, and other API tools.
{
"info": {
"title": "Connect AI Proxy API"
},
"openapi": "3.0.3"
}Postman Collection v2.1 export generated from the local API documentation manifest.
{
"info": {
"name": "Connect AI Proxy API"
}
}Returns whether the local process is reachable and whether proxy endpoints are currently enabled.
{
"ok": true,
"proxy_running": true
}Serves the local HTML page used by the browser extension bridge for a safe wake and connection probe.
<!doctype html>...Lists model aliases exposed through the Anthropic-compatible namespace.
Headers: anthropic-version.
{
"data": [
{
"display_name": "sonnet[1m]",
"id": "sonnet[1m]",
"type": "model"
}
],
"object": "list"
}Lists exposed model aliases with upstream model ids, the active context window, maximum input budget, and maximum output tokens.
Headers: anthropic-version.
{
"data": [
{
"context": "200k",
"context_window_tokens": 200000,
"display_name": "sonnet[1m]",
"id": "sonnet[1m]",
"limits_known": true,
"limits_source": "built_in",
"max_input_tokens": 72000,
"max_output_tokens": 128000,
"type": "model_capability",
"upstream_model": "gpt-5.5"
}
],
"object": "list",
"units": "tokens"
}Accepts Claude Messages API style requests, then routes them to Codex or an OpenAI-compatible provider. Streaming is supported with server-sent events.
Headers: anthropic-version, X-Proxy-Session-Id.
{
"max_tokens": 256,
"messages": [
{
"content": "Say hello in one sentence.",
"role": "user"
}
],
"model": "{{model}}",
"stream": false
}{
"content": [
{
"text": "Hello from the proxy.",
"type": "text"
}
],
"id": "msg_local",
"model": "{{model}}",
"role": "assistant",
"stop_reason": "end_turn",
"stop_sequence": null,
"type": "message",
"usage": {
"input_tokens": 12,
"output_tokens": 6
}
}Returns a local approximate input token count for a Claude Messages API style request.
Headers: anthropic-version.
{
"messages": [
{
"content": "Quick count test",
"role": "user"
}
],
"model": "{{model}}"
}{
"input_tokens": 14
}Lists model aliases exposed through the OpenAI-compatible namespace.
{
"data": [
{
"display_name": "gpt-5.5",
"id": "gpt-5.5",
"type": "model"
}
],
"object": "list"
}Lists exposed model aliases with upstream model ids, the active context window, maximum input budget, and maximum output tokens.
{
"data": [
{
"context": "200k",
"context_window_tokens": 200000,
"display_name": "gpt-5.3-codex",
"id": "gpt-5.3-codex",
"limits_known": true,
"limits_source": "built_in",
"max_input_tokens": 72000,
"max_output_tokens": 128000,
"type": "model_capability",
"upstream_model": "gpt-5.3-codex"
}
],
"object": "list",
"units": "tokens"
}Accepts OpenAI Chat Completions style requests. The proxy either forwards to a provider route or converts to Codex Responses internally.
Headers: X-Proxy-Session-Id.
{
"max_completion_tokens": 256,
"messages": [
{
"content": "Say hello.",
"role": "user"
}
],
"model": "{{model}}",
"stream": false
}{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "Hello from the proxy.",
"role": "assistant"
}
}
],
"created": 1767225600,
"id": "chatcmpl_local",
"model": "{{model}}",
"object": "chat.completion",
"usage": {
"completion_tokens": 6,
"prompt_tokens": 12
}
}Accepts OpenAI Responses API style requests. The local Codex route disables storage and can map stable session ids to local prompt cache keys.
Headers: X-Proxy-Session-Id.
{
"input": [
{
"content": "Say hello.",
"role": "user"
}
],
"model": "{{model}}",
"stream": false
}{
"id": "resp_local",
"model": "{{model}}",
"object": "response",
"output": [
{
"content": [
{
"text": "Hello from the proxy.",
"type": "output_text"
}
],
"role": "assistant",
"type": "message"
}
],
"usage": {
"input_tokens": 12,
"output_tokens": 6
}
}OpenAI-compatible provider pass-through. Requires the default upstream to be OpenAI-compatible or the client key to route to a provider key.
Query: limit, after, purpose.
{
"data": [
{
"id": "file-abc123",
"object": "file",
"purpose": "assistants"
}
],
"object": "list"
}OpenAI-compatible multipart file upload pass-through.
purpose = assistants
file = <nil>
{
"id": "file-abc123",
"object": "file",
"purpose": "assistants"
}OpenAI-compatible provider pass-through for nested file paths such as file metadata or file content.
Path: path.
{
"id": "file-abc123",
"object": "file"
}OpenAI-compatible provider pass-through for file deletion where the upstream provider supports it.
Path: path.
{
"deleted": true,
"id": "file-abc123",
"object": "file"
}Returns whether local admin auth is configured and whether the current browser session is authenticated.
{
"authenticated": true,
"configured": true,
"username": "admin"
}Creates the first local admin login. Fails once admin auth is already configured.
{
"password": "{{adminPassword}}",
"username": "{{adminUsername}}"
}{
"message": "Admin login configured.",
"ok": true
}Sets the local admin session cookie when the credentials are valid.
{
"password": "{{adminPassword}}",
"remember": true,
"username": "{{adminUsername}}"
}{
"ok": true
}Expires the local admin session cookie.
{
"ok": true
}Returns runtime status, local and public URLs, model rows, auth metadata, dashboard metrics, and the latest request summary.
{
"anthropic_url": "https://proxy.example.com/anthropic",
"display_url": "https://proxy.example.com",
"local_url": "http://127.0.0.1:4000",
"openai_url": "https://proxy.example.com/openai/v1",
"proxy_running": true,
"public_url": "https://proxy.example.com",
"running": true,
"update": {
"current_version": "0.4.3",
"latest_version": "0.4.4",
"running": false,
"update_available": true
},
"upstream": "codex",
"version": "0.4.3"
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
Returns the installed version, latest GitHub version check, auto-update setting, and the last dashboard-started update status.
{
"auto_update": false,
"current_version": "0.4.3",
"latest_version": "0.4.4",
"running": false,
"state": "idle",
"update_available": true
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
Refreshes the configured VERSION URL and returns the current update status without starting an update.
{
"message": "Update check complete.",
"ok": true,
"update": {
"current_version": "0.4.3",
"latest_version": "0.4.4",
"update_available": true
}
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
Starts update-linux.sh in the background with a status file so the dashboard can reconnect after the service restarts.
{
"message": "Update started.",
"ok": true,
"update": {
"running": true,
"state": "queued"
}
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
Saves automatic-update, branch, VERSION URL, repository path, status-file path, and full-system updater options.
{
"auto_update": true,
"branch": "main",
"full_system_update": false,
"repo_dir": "/root/claude-code-proxy",
"status_file": "/opt/connect-ai-proxy/.proxy.update.json",
"version_url": "https://raw.githubusercontent.com/xMed-Jordan/claude-code-proxy/main/VERSION"
}{
"auto_update": true,
"full_system_update": false,
"ok": true,
"update": {
"auto_update": true
}
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
Returns .env-backed configuration values for the control panel. Secret-looking values are masked in config fields.
{
"aliases": [],
"config": {
"OPENAI_BASE_URL": "https://api.openai.com/v1",
"PROXY_API_KEY": "sk-...abcd"
},
"secrets": {
"PROXY_API_KEY": "{{proxyApiKey}}"
}
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
Persists selected .env values and model aliases. Restart the proxy to apply process-level settings.
{
"aliases": [
{
"Context": "1m",
"From": "sonnet[1m]",
"To": "gpt-5.5"
}
],
"config": {
"OPENAI_BASE_URL": "https://api.openai.com/v1"
}
}{
"message": "Configuration saved. Restart proxy to apply changes.",
"ok": true
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
{
"models": [
{
"alias": "sonnet[1m]",
"context": "1m",
"real": "gpt-5.5"
}
]
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
{
"models": [
{
"alias": "sonnet[1m]",
"context": "1m",
"real": "gpt-5.5"
}
]
}{
"message": "Model aliases saved and active for new requests.",
"models": [
{
"alias": "sonnet[1m]",
"context": "1m",
"real": "gpt-5.5"
}
],
"ok": true
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
{
"clients": [],
"defaults": {
"anthropic_base": "https://proxy.example.com/anthropic",
"openai_local_url": "https://proxy.example.com/openai/v1"
},
"providers": []
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
{
"api_key": "{{providerApiKey}}",
"base_url": "https://api.openai.com/v1",
"label": "OpenAI key",
"provider": "openai"
}{
"clients": [],
"message": "Provider key saved.",
"ok": true,
"providers": []
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
{
"label": "Postman",
"provider": "default",
"provider_key_id": "",
"schema": "both"
}{
"api_key": "{{proxyApiKey}}",
"clients": [],
"message": "Client key created. Copy it now; it will not be shown again.",
"ok": true,
"providers": []
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
{
"enabled": true,
"id": "{{clientKeyId}}",
"kind": "client"
}{
"clients": [],
"ok": true,
"providers": []
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
{
"duration_total": 123,
"model": "sonnet[1m]",
"ok": true,
"ran_at": "12:00:00",
"steps": [
{
"name": "GET /anthropic/v1/models",
"ok": true,
"status": 200
}
],
"upstream_model": "gpt-5.5"
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
{
"model": "{{model}}",
"prompt": "Reply with only OK.",
"stream": false
}{
"duration_ms": 450,
"raw": "{\"type\":\"message\"}",
"status": 200,
"text": "OK"
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
{
"rows": [],
"stderr": "",
"stdout": "",
"trace": ""
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
{
"available": true,
"last_action": "browser_status",
"mode": "dedicated"
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
{
"source": "postman",
"url": "http://127.0.0.1:4000/antigravity/bridge"
}{
"ok": true,
"probe": {
"source": "postman"
}
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
{
"message": "Proxy endpoints stopped. Claude settings restored. Control panel remains online.",
"ok": true,
"running": false
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
{
"message": "Proxy endpoints started. Claude settings applied.",
"ok": true,
"running": true
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.
{
"message": "Proxy restarting.",
"ok": true
}Admin routes require a valid local browser session cookie. In Postman, call the login endpoint first and let Postman store the cookie, or set {{adminSessionCookie}}.