{"components":{"schemas":{"AnthropicMessageRequest":{"additionalProperties":true,"properties":{"max_tokens":{"description":"Maximum output tokens.","type":"integer"},"messages":{"items":{"properties":{"content":{"nullable":true},"role":{"description":"Message role.","type":"string"}},"required":["role"],"type":"object"},"type":"array"},"model":{"description":"Claude-compatible model alias.","type":"string"},"output_config":{"additionalProperties":true,"type":"object"},"speed":{"description":"Optional speed setting.","type":"string"},"stream":{"description":"Enable SSE streaming.","type":"boolean"},"system":{"nullable":true},"temperature":{"type":"number"},"tools":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["model","messages"],"type":"object"},"AnthropicMessageResponse":{"additionalProperties":true,"properties":{"content":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"id":{"description":"Message id.","type":"string"},"model":{"description":"Requested model alias.","type":"string"},"role":{"description":"assistant","type":"string"},"stop_reason":{"description":"Stop reason.","type":"string"},"stop_sequence":{"nullable":true},"type":{"description":"message","type":"string"},"usage":{"additionalProperties":true,"type":"object"}},"type":"object"},"AntigravityProbeRequest":{"additionalProperties":true,"type":"object"},"AntigravityProbeResponse":{"properties":{"ok":{"description":"Probe accepted.","type":"boolean"},"probe":{"additionalProperties":true,"type":"object"}},"required":["ok","probe"],"type":"object"},"AntigravityStatusResponse":{"additionalProperties":true,"type":"object"},"CountTokensResponse":{"properties":{"input_tokens":{"description":"Approximate input token count.","type":"integer"}},"required":["input_tokens"],"type":"object"},"ErrorResponse":{"additionalProperties":true,"properties":{"error":{"nullable":true},"type":{"description":"Anthropic-style error wrapper type.","type":"string"}},"type":"object"},"HTMLDocument":{"description":"HTML document.","type":"string"},"HealthResponse":{"properties":{"ok":{"description":"Process is reachable.","type":"boolean"},"proxy_running":{"description":"Proxy endpoints are enabled.","type":"boolean"}},"required":["ok","proxy_running"],"type":"object"},"ModelCapabilitiesResponse":{"properties":{"data":{"items":{"properties":{"alias":{"description":"Local model alias.","type":"string"},"context":{"description":"Configured context label.","type":"string"},"context_window_tokens":{"description":"Active context window advertised to clients.","type":"integer"},"default":{"description":"Whether this alias is a default choice.","type":"boolean"},"display_name":{"description":"Display name.","type":"string"},"id":{"description":"Local model alias.","type":"string"},"limits_known":{"description":"Whether the proxy has a known output limit for this upstream model.","type":"boolean"},"limits_source":{"description":"Source for the limit value.","type":"string"},"max_input_tokens":{"description":"Maximum input budget after reserving output tokens.","type":"integer"},"max_output_tokens":{"description":"Maximum output tokens for one request.","type":"integer"},"recommended":{"description":"Whether this alias is the recommended choice.","type":"boolean"},"status":{"description":"Proxy support status for the upstream model.","type":"string"},"type":{"description":"Object type.","type":"string"},"upstream_model":{"description":"Resolved upstream model id.","type":"string"}},"required":["id","type","context_window_tokens","max_input_tokens","max_output_tokens","limits_known"],"type":"object"},"type":"array"},"object":{"description":"list","type":"string"},"units":{"description":"Token unit label.","type":"string"}},"required":["object","data","units"],"type":"object"},"ModelListResponse":{"properties":{"data":{"items":{"properties":{"display_name":{"description":"Display name.","type":"string"},"id":{"description":"Model id.","type":"string"},"type":{"description":"Object type.","type":"string"}},"type":"object"},"type":"array"},"object":{"description":"list","type":"string"}},"required":["object","data"],"type":"object"},"OKResponse":{"additionalProperties":true,"properties":{"message":{"description":"Human-readable status message.","type":"string"},"ok":{"description":"Whether the operation succeeded.","type":"boolean"},"running":{"description":"Proxy running state.","type":"boolean"}},"type":"object"},"OpenAIChatCompletionRequest":{"additionalProperties":true,"properties":{"extra_body":{"nullable":true},"max_completion_tokens":{"description":"Maximum output tokens.","type":"integer"},"max_tokens":{"description":"Maximum output tokens.","type":"integer"},"messages":{"items":{"properties":{"content":{"nullable":true},"role":{"description":"Message role.","type":"string"}},"required":["role"],"type":"object"},"type":"array"},"metadata":{"additionalProperties":true,"type":"object"},"model":{"description":"OpenAI-compatible model id or local alias.","type":"string"},"reasoning_effort":{"description":"Optional reasoning effort.","type":"string"},"stream":{"description":"Enable SSE streaming.","type":"boolean"},"temperature":{"type":"number"},"tools":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"user":{"description":"Optional user/session id.","type":"string"}},"required":["model","messages"],"type":"object"},"OpenAIChatCompletionResponse":{"additionalProperties":true,"properties":{"choices":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"created":{"description":"Unix timestamp.","type":"integer"},"id":{"description":"Completion id.","type":"string"},"model":{"description":"Model id.","type":"string"},"object":{"description":"chat.completion","type":"string"},"usage":{"additionalProperties":true,"type":"object"}},"type":"object"},"OpenAPIDocument":{"additionalProperties":true,"type":"object"},"PostmanCollection":{"additionalProperties":true,"type":"object"},"ProviderPassThroughResponse":{"additionalProperties":true,"description":"Provider-shaped OpenAI-compatible response.","type":"object"},"ResponsesRequest":{"additionalProperties":true,"properties":{"input":{"items":{"nullable":true},"type":"array"},"instructions":{"description":"Optional system instructions.","type":"string"},"max_output_tokens":{"description":"Maximum output tokens.","type":"integer"},"model":{"description":"OpenAI-compatible model id or local alias.","type":"string"},"prompt_cache_key":{"description":"Optional prompt cache key.","type":"string"},"reasoning":{"additionalProperties":true,"type":"object"},"service_tier":{"description":"Optional service tier.","type":"string"},"store":{"description":"Ignored locally and forced false.","type":"boolean"},"stream":{"description":"Enable SSE streaming.","type":"boolean"},"temperature":{"type":"number"},"tools":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["model","input"],"type":"object"},"ResponsesResponse":{"additionalProperties":true,"properties":{"id":{"description":"Response id.","type":"string"},"model":{"description":"Model id.","type":"string"},"object":{"description":"response","type":"string"},"output":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"usage":{"additionalProperties":true,"type":"object"}},"type":"object"},"UIAuthCredentialsRequest":{"properties":{"password":{"description":"Admin password.","type":"string"},"remember":{"description":"Keep the session signed in for a year instead of 24 hours.","type":"boolean"},"username":{"description":"Admin username.","type":"string"}},"required":["username","password"],"type":"object"},"UIAuthStatusResponse":{"properties":{"authenticated":{"description":"Current request has a valid admin cookie.","type":"boolean"},"configured":{"description":"Admin auth is configured.","type":"boolean"},"username":{"description":"Configured admin username.","type":"string"}},"required":["configured","authenticated","username"],"type":"object"},"UIClientKeyCreateResponse":{"additionalProperties":true,"properties":{"api_key":{"description":"Raw local client API key, shown once.","type":"string"},"clients":{"items":{"additionalProperties":true,"properties":{"created_at":{"description":"Created timestamp.","type":"string"},"enabled":{"description":"Whether the key is enabled.","type":"boolean"},"id":{"description":"Client key id.","type":"string"},"key_preview":{"description":"Masked key preview.","type":"string"},"label":{"description":"Label.","type":"string"},"last_used_at":{"description":"Last-used timestamp.","type":"string"},"provider":{"description":"Provider route.","type":"string"},"provider_key_id":{"description":"Provider key id.","type":"string"},"provider_label":{"description":"Provider label.","type":"string"},"schema":{"description":"anthropic, openai, or both.","type":"string"},"updated_at":{"description":"Updated timestamp.","type":"string"}},"type":"object"},"type":"array"},"message":{"description":"Status message.","type":"string"},"ok":{"description":"Whether creation succeeded.","type":"boolean"},"providers":{"items":{"additionalProperties":true,"properties":{"base_url":{"description":"Provider base URL.","type":"string"},"created_at":{"description":"Created timestamp.","type":"string"},"enabled":{"description":"Whether the key is enabled.","type":"boolean"},"id":{"description":"Provider key id.","type":"string"},"key_preview":{"description":"Masked key preview.","type":"string"},"label":{"description":"Label.","type":"string"},"provider":{"description":"Provider name.","type":"string"},"schema":{"description":"Provider schema.","type":"string"},"updated_at":{"description":"Updated timestamp.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"UIClientKeyRequest":{"properties":{"label":{"description":"Client key label.","type":"string"},"provider":{"description":"default, openai, or gemini.","type":"string"},"provider_key_id":{"description":"Provider key id.","type":"string"},"schema":{"description":"both, anthropic, or openai.","type":"string"}},"type":"object"},"UIConfigRequest":{"properties":{"aliases":{"items":{"properties":{"Context":{"description":"Context label.","type":"string"},"From":{"description":"Alias.","type":"string"},"To":{"description":"Model id.","type":"string"}},"type":"object"},"type":"array"},"config":{"additionalProperties":{"type":"string"},"type":"object"}},"type":"object"},"UIConfigResponse":{"properties":{"aliases":{"items":{"properties":{"alias":{"description":"Local model alias.","type":"string"},"context":{"description":"Optional context label.","type":"string"},"real":{"description":"Upstream model id.","type":"string"}},"type":"object"},"type":"array"},"config":{"additionalProperties":{"type":"string"},"type":"object"},"secrets":{"additionalProperties":{"type":"string"},"type":"object"}},"required":["config","secrets","aliases"],"type":"object"},"UIKeyToggleRequest":{"properties":{"enabled":{"description":"Desired enabled state.","type":"boolean"},"id":{"description":"Key id.","type":"string"},"kind":{"description":"provider or client.","type":"string"}},"required":["kind","id","enabled"],"type":"object"},"UIKeysResponse":{"additionalProperties":true,"properties":{"clients":{"items":{"additionalProperties":true,"properties":{"created_at":{"description":"Created timestamp.","type":"string"},"enabled":{"description":"Whether the key is enabled.","type":"boolean"},"id":{"description":"Client key id.","type":"string"},"key_preview":{"description":"Masked key preview.","type":"string"},"label":{"description":"Label.","type":"string"},"last_used_at":{"description":"Last-used timestamp.","type":"string"},"provider":{"description":"Provider route.","type":"string"},"provider_key_id":{"description":"Provider key id.","type":"string"},"provider_label":{"description":"Provider label.","type":"string"},"schema":{"description":"anthropic, openai, or both.","type":"string"},"updated_at":{"description":"Updated timestamp.","type":"string"}},"type":"object"},"type":"array"},"defaults":{"additionalProperties":{"type":"string"},"type":"object"},"providers":{"items":{"additionalProperties":true,"properties":{"base_url":{"description":"Provider base URL.","type":"string"},"created_at":{"description":"Created timestamp.","type":"string"},"enabled":{"description":"Whether the key is enabled.","type":"boolean"},"id":{"description":"Provider key id.","type":"string"},"key_preview":{"description":"Masked key preview.","type":"string"},"label":{"description":"Label.","type":"string"},"provider":{"description":"Provider name.","type":"string"},"schema":{"description":"Provider schema.","type":"string"},"updated_at":{"description":"Updated timestamp.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"UILogsResponse":{"properties":{"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"stderr":{"description":"Proxy stderr log.","type":"string"},"stdout":{"description":"Proxy stdout log.","type":"string"},"trace":{"description":"Trace log.","type":"string"}},"type":"object"},"UIModelsRequest":{"properties":{"models":{"items":{"properties":{"alias":{"description":"Local model alias.","type":"string"},"context":{"description":"Optional context label.","type":"string"},"real":{"description":"Upstream model id.","type":"string"}},"type":"object"},"type":"array"}},"required":["models"],"type":"object"},"UIModelsResponse":{"additionalProperties":true,"properties":{"message":{"description":"Status message.","type":"string"},"models":{"items":{"properties":{"alias":{"description":"Local model alias.","type":"string"},"context":{"description":"Optional context label.","type":"string"},"real":{"description":"Upstream model id.","type":"string"}},"type":"object"},"type":"array"},"ok":{"description":"Whether save succeeded.","type":"boolean"}},"type":"object"},"UIProviderKeyRequest":{"properties":{"api_key":{"description":"Provider API key.","type":"string"},"base_url":{"description":"Provider base URL.","type":"string"},"id":{"description":"Existing provider key id when renewing.","type":"string"},"label":{"description":"Label.","type":"string"},"provider":{"description":"openai or gemini.","type":"string"}},"required":["provider","api_key"],"type":"object"},"UIStatusResponse":{"additionalProperties":true,"properties":{"anthropic_url":{"description":"Anthropic-compatible base URL.","type":"string"},"antigravity":{"additionalProperties":true,"type":"object"},"bind_url":{"description":"Local bind address.","type":"string"},"claude_settings":{"additionalProperties":true,"type":"object"},"claude_version":{"description":"Claude CLI version.","type":"string"},"codex_auth":{"additionalProperties":true,"type":"object"},"codex_sessions":{"additionalProperties":true,"type":"object"},"dashboard":{"additionalProperties":true,"type":"object"},"display_url":{"description":"Preferred URL for the control panel to show.","type":"string"},"host":{"description":"Local bind host.","type":"string"},"last_request":{"additionalProperties":true,"type":"object"},"local_url":{"description":"Local control panel URL.","type":"string"},"models":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"openai_url":{"description":"OpenAI-compatible base URL.","type":"string"},"pid":{"description":"Process id.","type":"integer"},"port":{"description":"Local port.","type":"string"},"proxy_key":{"description":"Current proxy key.","type":"string"},"proxy_key_masked":{"description":"Masked proxy key.","type":"string"},"proxy_running":{"description":"Proxy endpoints are running.","type":"boolean"},"public_url":{"description":"Public reverse-proxy URL when configured.","type":"string"},"running":{"description":"Proxy endpoints are running.","type":"boolean"},"update":{"additionalProperties":true,"type":"object"},"upstream":{"description":"Configured upstream.","type":"string"},"uptime_seconds":{"description":"Process uptime.","type":"integer"},"version":{"description":"Installed proxy version.","type":"string"}},"type":"object"},"UITestRequest":{"properties":{"model":{"description":"Model alias.","type":"string"},"prompt":{"description":"Prompt text.","type":"string"},"stream":{"description":"Use streaming.","type":"boolean"}},"type":"object"},"UITestResponse":{"properties":{"duration_ms":{"description":"Duration in ms.","type":"integer"},"raw":{"description":"Raw response body.","type":"string"},"status":{"description":"HTTP status from test request.","type":"integer"},"text":{"description":"Extracted assistant text.","type":"string"}},"type":"object"},"UIUpdateSettingsRequest":{"additionalProperties":true,"properties":{"auto_update":{"description":"Enable automatic app updates.","type":"boolean"},"branch":{"description":"Git branch used by the updater.","type":"string"},"full_system_update":{"description":"Allow manual dashboard updates to run the full system updater.","type":"boolean"},"repo_dir":{"description":"Repository directory used by the updater.","type":"string"},"status_file":{"description":"Machine-readable status file path.","type":"string"},"version_url":{"description":"VERSION URL checked for newer releases.","type":"string"}},"type":"object"},"UIUpdateSettingsResponse":{"additionalProperties":true,"properties":{"auto_update":{"description":"Automatic update setting.","type":"boolean"},"full_system_update":{"description":"Full system update setting.","type":"boolean"},"ok":{"description":"Whether settings were saved.","type":"boolean"},"update":{"additionalProperties":true,"type":"object"}},"type":"object"},"UIUpdateStartResponse":{"additionalProperties":true,"properties":{"message":{"description":"Human-readable status.","type":"string"},"ok":{"description":"Whether the update was queued.","type":"boolean"},"update":{"additionalProperties":true,"type":"object"}},"type":"object"},"UIUpdateStatusResponse":{"additionalProperties":true,"properties":{"auto_update":{"description":"Automatic app updates are enabled.","type":"boolean"},"branch":{"description":"Git branch used by the updater.","type":"string"},"current_version":{"description":"Installed proxy version.","type":"string"},"finished_at":{"description":"Update finish time.","type":"string"},"full_system_update":{"description":"Manual dashboard updates may run the full system updater.","type":"boolean"},"latest":{"additionalProperties":true,"type":"object"},"latest_version":{"description":"Latest version from GitHub.","type":"string"},"message":{"description":"Human-readable update status.","type":"string"},"phase":{"description":"Current update phase.","type":"string"},"repo_dir":{"description":"Repository directory used by the updater.","type":"string"},"running":{"description":"An update is currently active.","type":"boolean"},"started_at":{"description":"Update start time.","type":"string"},"state":{"description":"idle, queued, running, succeeded, or failed.","type":"string"},"status_file":{"description":"Machine-readable status file path.","type":"string"},"update_available":{"description":"A newer version is available.","type":"boolean"},"updated_at":{"description":"Last status update time.","type":"string"},"version_url":{"description":"VERSION URL checked for newer releases.","type":"string"}},"type":"object"},"UIValidateResponse":{"additionalProperties":true,"properties":{"duration_total":{"description":"Total duration in ms.","type":"integer"},"model":{"description":"Requested model alias.","type":"string"},"ok":{"description":"All validation steps passed.","type":"boolean"},"ran_at":{"description":"Local time.","type":"string"},"steps":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"upstream_model":{"description":"Resolved upstream model.","type":"string"}},"type":"object"}},"securitySchemes":{"AdminSessionCookie":{"in":"cookie","name":"ccp_admin_session","type":"apiKey"},"ProxyAnthropicApiKey":{"in":"header","name":"anthropic-api-key","type":"apiKey"},"ProxyApiKey":{"description":"Local proxy key. Use {{proxyApiKey}} in Postman.","in":"header","name":"x-api-key","type":"apiKey"},"ProxyBearer":{"scheme":"bearer","type":"http"},"ProxyGenericApiKey":{"in":"header","name":"api-key","type":"apiKey"}}},"info":{"description":"Local Postman-ready API documentation for connect-ai-proxy. Examples use placeholders and never embed local secrets.","title":"Connect AI Proxy API","version":"1.0.0"},"openapi":"3.0.3","paths":{"/anthropic/v1/messages":{"post":{"description":"Accepts Claude Messages API style requests, then routes them to Codex or an OpenAI-compatible provider. Streaming is supported with server-sent events.\n\nAuth: Proxy API key","operationId":"createAnthropicMessage","parameters":[{"description":"Anthropic API version. The proxy accepts this for Claude-compatible clients.","example":"{{anthropicVersion}}","in":"header","name":"anthropic-version","required":true,"schema":{"type":"string"}},{"description":"Optional stable local session id. X-Codex-Session-Id, X-OpenAI-Session-Id, X-Claude-Code-Session-Id, X-Claude-Session-Id, and X-Session-Id are also accepted.","example":"{{sessionId}}","in":"header","name":"X-Proxy-Session-Id","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"max_tokens":256,"messages":[{"content":"Say hello in one sentence.","role":"user"}],"model":"{{model}}","stream":false},"schema":{"$ref":"#/components/schemas/AnthropicMessageRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"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}},"schema":{"$ref":"#/components/schemas/AnthropicMessageResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"ProxyApiKey":[]},{"ProxyAnthropicApiKey":[]},{"ProxyGenericApiKey":[]},{"ProxyBearer":[]}],"summary":"Create a Claude-compatible message","tags":["Anthropic-compatible"]}},"/anthropic/v1/messages/count_tokens":{"post":{"description":"Returns a local approximate input token count for a Claude Messages API style request.\n\nAuth: Proxy API key","operationId":"countAnthropicTokens","parameters":[{"description":"Anthropic API version. The proxy accepts this for Claude-compatible clients.","example":"{{anthropicVersion}}","in":"header","name":"anthropic-version","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"messages":[{"content":"Quick count test","role":"user"}],"model":"{{model}}"},"schema":{"$ref":"#/components/schemas/AnthropicMessageRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"input_tokens":14},"schema":{"$ref":"#/components/schemas/CountTokensResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"ProxyApiKey":[]},{"ProxyAnthropicApiKey":[]},{"ProxyGenericApiKey":[]},{"ProxyBearer":[]}],"summary":"Estimate Claude-compatible input tokens","tags":["Anthropic-compatible"]}},"/anthropic/v1/model-capabilities":{"get":{"description":"Lists exposed model aliases with upstream model ids, the active context window, maximum input budget, and maximum output tokens.\n\nAuth: Proxy API key","operationId":"listAnthropicModelCapabilities","parameters":[{"description":"Anthropic API version. The proxy accepts this for Claude-compatible clients.","example":"{{anthropicVersion}}","in":"header","name":"anthropic-version","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"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"},"schema":{"$ref":"#/components/schemas/ModelCapabilitiesResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"ProxyApiKey":[]},{"ProxyAnthropicApiKey":[]},{"ProxyGenericApiKey":[]},{"ProxyBearer":[]}],"summary":"List Claude-compatible model token limits","tags":["Anthropic-compatible"]}},"/anthropic/v1/models":{"get":{"description":"Lists model aliases exposed through the Anthropic-compatible namespace.\n\nAuth: Proxy API key","operationId":"listAnthropicModels","parameters":[{"description":"Anthropic API version. The proxy accepts this for Claude-compatible clients.","example":"{{anthropicVersion}}","in":"header","name":"anthropic-version","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"display_name":"sonnet[1m]","id":"sonnet[1m]","type":"model"}],"object":"list"},"schema":{"$ref":"#/components/schemas/ModelListResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"ProxyApiKey":[]},{"ProxyAnthropicApiKey":[]},{"ProxyGenericApiKey":[]},{"ProxyBearer":[]}],"summary":"List Claude-compatible model aliases","tags":["Anthropic-compatible"]}},"/antigravity/bridge":{"get":{"description":"Serves the local HTML page used by the browser extension bridge for a safe wake and connection probe.\n\nAuth: Public local","operationId":"getAntigravityBridge","responses":{"200":{"content":{"text/html":{"example":"\u003c!doctype html\u003e...","schema":{"$ref":"#/components/schemas/HTMLDocument"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"summary":"Open Antigravity browser bridge probe","tags":["Public"]}},"/docs":{"get":{"description":"Human-readable documentation generated from the same manifest as the OpenAPI and Postman exports.\n\nAuth: Public local","operationId":"getDocs","responses":{"200":{"content":{"text/html":{"example":"\u003c!doctype html\u003e...","schema":{"$ref":"#/components/schemas/HTMLDocument"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"summary":"Read local API documentation","tags":["Documentation"]}},"/health":{"get":{"description":"Returns whether the local process is reachable and whether proxy endpoints are currently enabled.\n\nAuth: Public local","operationId":"getHealth","responses":{"200":{"content":{"application/json":{"example":{"ok":true,"proxy_running":true},"schema":{"$ref":"#/components/schemas/HealthResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"summary":"Check proxy health","tags":["Public"]}},"/openai/v1/chat/completions":{"post":{"description":"Accepts OpenAI Chat Completions style requests. The proxy either forwards to a provider route or converts to Codex Responses internally.\n\nAuth: Proxy API key","operationId":"createChatCompletion","parameters":[{"description":"Optional stable local session id. X-Codex-Session-Id, X-OpenAI-Session-Id, X-Claude-Code-Session-Id, X-Claude-Session-Id, and X-Session-Id are also accepted.","example":"{{sessionId}}","in":"header","name":"X-Proxy-Session-Id","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"max_completion_tokens":256,"messages":[{"content":"Say hello.","role":"user"}],"model":"{{model}}","stream":false},"schema":{"$ref":"#/components/schemas/OpenAIChatCompletionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"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}},"schema":{"$ref":"#/components/schemas/OpenAIChatCompletionResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"ProxyApiKey":[]},{"ProxyAnthropicApiKey":[]},{"ProxyGenericApiKey":[]},{"ProxyBearer":[]}],"summary":"Create an OpenAI-compatible chat completion","tags":["OpenAI-compatible"]}},"/openai/v1/files":{"get":{"description":"OpenAI-compatible provider pass-through. Requires the default upstream to be OpenAI-compatible or the client key to route to a provider key.\n\nAuth: Proxy API key","operationId":"listOpenAIFiles","parameters":[{"description":"Provider-specific page size.","example":20,"in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"Provider-specific cursor.","example":"file-abc123","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"Provider-specific file purpose filter.","example":"assistants","in":"query","name":"purpose","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":[{"id":"file-abc123","object":"file","purpose":"assistants"}],"object":"list"},"schema":{"$ref":"#/components/schemas/ProviderPassThroughResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"ProxyApiKey":[]},{"ProxyAnthropicApiKey":[]},{"ProxyGenericApiKey":[]},{"ProxyBearer":[]}],"summary":"List provider files","tags":["OpenAI-compatible"]},"post":{"description":"OpenAI-compatible multipart file upload pass-through.\n\nAuth: Proxy API key","operationId":"uploadOpenAIFile","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"},"purpose":{"type":"string"}},"required":["purpose","file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"id":"file-abc123","object":"file","purpose":"assistants"},"schema":{"$ref":"#/components/schemas/ProviderPassThroughResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"ProxyApiKey":[]},{"ProxyAnthropicApiKey":[]},{"ProxyGenericApiKey":[]},{"ProxyBearer":[]}],"summary":"Upload a provider file","tags":["OpenAI-compatible"]}},"/openai/v1/files/{path}":{"delete":{"description":"OpenAI-compatible provider pass-through for file deletion where the upstream provider supports it.\n\nAuth: Proxy API key","operationId":"deleteOpenAIFilePath","parameters":[{"description":"Provider file path after /openai/v1/files/, for example file-abc123 or file-abc123/content.","example":"file-abc123","in":"path","name":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"deleted":true,"id":"file-abc123","object":"file"},"schema":{"$ref":"#/components/schemas/ProviderPassThroughResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"ProxyApiKey":[]},{"ProxyAnthropicApiKey":[]},{"ProxyGenericApiKey":[]},{"ProxyBearer":[]}],"summary":"Delete a provider file path","tags":["OpenAI-compatible"]},"get":{"description":"OpenAI-compatible provider pass-through for nested file paths such as file metadata or file content.\n\nAuth: Proxy API key","operationId":"getOpenAIFilePath","parameters":[{"description":"Provider file path after /openai/v1/files/, for example file-abc123 or file-abc123/content.","example":"file-abc123","in":"path","name":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"id":"file-abc123","object":"file"},"schema":{"$ref":"#/components/schemas/ProviderPassThroughResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"ProxyApiKey":[]},{"ProxyAnthropicApiKey":[]},{"ProxyGenericApiKey":[]},{"ProxyBearer":[]}],"summary":"Retrieve a provider file path","tags":["OpenAI-compatible"]}},"/openai/v1/model-capabilities":{"get":{"description":"Lists exposed model aliases with upstream model ids, the active context window, maximum input budget, and maximum output tokens.\n\nAuth: Proxy API key","operationId":"listOpenAIModelCapabilities","responses":{"200":{"content":{"application/json":{"example":{"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"},"schema":{"$ref":"#/components/schemas/ModelCapabilitiesResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"ProxyApiKey":[]},{"ProxyAnthropicApiKey":[]},{"ProxyGenericApiKey":[]},{"ProxyBearer":[]}],"summary":"List OpenAI-compatible model token limits","tags":["OpenAI-compatible"]}},"/openai/v1/models":{"get":{"description":"Lists model aliases exposed through the OpenAI-compatible namespace.\n\nAuth: Proxy API key","operationId":"listOpenAIModels","responses":{"200":{"content":{"application/json":{"example":{"data":[{"display_name":"gpt-5.5","id":"gpt-5.5","type":"model"}],"object":"list"},"schema":{"$ref":"#/components/schemas/ModelListResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"ProxyApiKey":[]},{"ProxyAnthropicApiKey":[]},{"ProxyGenericApiKey":[]},{"ProxyBearer":[]}],"summary":"List OpenAI-compatible model aliases","tags":["OpenAI-compatible"]}},"/openai/v1/responses":{"post":{"description":"Accepts OpenAI Responses API style requests. The local Codex route disables storage and can map stable session ids to local prompt cache keys.\n\nAuth: Proxy API key","operationId":"createResponse","parameters":[{"description":"Optional stable local session id. X-Codex-Session-Id, X-OpenAI-Session-Id, X-Claude-Code-Session-Id, X-Claude-Session-Id, and X-Session-Id are also accepted.","example":"{{sessionId}}","in":"header","name":"X-Proxy-Session-Id","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"input":[{"content":"Say hello.","role":"user"}],"model":"{{model}}","stream":false},"schema":{"$ref":"#/components/schemas/ResponsesRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"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}},"schema":{"$ref":"#/components/schemas/ResponsesResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"ProxyApiKey":[]},{"ProxyAnthropicApiKey":[]},{"ProxyGenericApiKey":[]},{"ProxyBearer":[]}],"summary":"Create an OpenAI-compatible response","tags":["OpenAI-compatible"]}},"/openapi.json":{"get":{"description":"OpenAPI 3.0.3 JSON for Postman, Swagger UI, and other API tools.\n\nAuth: Public local","operationId":"getOpenAPI","responses":{"200":{"content":{"application/json":{"example":{"info":{"title":"Connect AI Proxy API"},"openapi":"3.0.3"},"schema":{"$ref":"#/components/schemas/OpenAPIDocument"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"summary":"Download OpenAPI document","tags":["Documentation"]}},"/postman.json":{"get":{"description":"Postman Collection v2.1 export generated from the local API documentation manifest.\n\nAuth: Public local","operationId":"getPostmanCollection","responses":{"200":{"content":{"application/json":{"example":{"info":{"name":"Connect AI Proxy API"}},"schema":{"$ref":"#/components/schemas/PostmanCollection"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"summary":"Download Postman collection","tags":["Documentation"]}},"/ui/api/antigravity":{"get":{"description":"Auth: Admin session cookie","operationId":"getUIAntigravity","responses":{"200":{"content":{"application/json":{"example":{"available":true,"last_action":"browser_status","mode":"dedicated"},"schema":{"$ref":"#/components/schemas/AntigravityStatusResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Read browser bridge status","tags":["Admin control panel"]}},"/ui/api/antigravity/probe":{"post":{"description":"Auth: Admin session cookie","operationId":"probeUIAntigravity","requestBody":{"content":{"application/json":{"example":{"source":"postman","url":"http://127.0.0.1:4000/antigravity/bridge"},"schema":{"$ref":"#/components/schemas/AntigravityProbeRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"ok":true,"probe":{"source":"postman"}},"schema":{"$ref":"#/components/schemas/AntigravityProbeResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Record browser bridge probe data","tags":["Admin control panel"]}},"/ui/api/auth/login":{"post":{"description":"Sets the local admin session cookie when the credentials are valid.\n\nAuth: Public local","operationId":"loginAdmin","requestBody":{"content":{"application/json":{"example":{"password":"{{adminPassword}}","remember":true,"username":"{{adminUsername}}"},"schema":{"$ref":"#/components/schemas/UIAuthCredentialsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"ok":true},"schema":{"$ref":"#/components/schemas/OKResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"summary":"Log in to the admin UI","tags":["Admin auth"]}},"/ui/api/auth/logout":{"post":{"description":"Expires the local admin session cookie.\n\nAuth: Public local","operationId":"logoutAdmin","responses":{"200":{"content":{"application/json":{"example":{"ok":true},"schema":{"$ref":"#/components/schemas/OKResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"summary":"Clear admin session","tags":["Admin auth"]}},"/ui/api/auth/setup":{"post":{"description":"Creates the first local admin login. Fails once admin auth is already configured.\n\nAuth: Public local","operationId":"setupAdminAuth","requestBody":{"content":{"application/json":{"example":{"password":"{{adminPassword}}","username":"{{adminUsername}}"},"schema":{"$ref":"#/components/schemas/UIAuthCredentialsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"message":"Admin login configured.","ok":true},"schema":{"$ref":"#/components/schemas/OKResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"summary":"Create local admin login","tags":["Admin auth"]}},"/ui/api/auth/status":{"get":{"description":"Returns whether local admin auth is configured and whether the current browser session is authenticated.\n\nAuth: Public local","operationId":"getAdminAuthStatus","responses":{"200":{"content":{"application/json":{"example":{"authenticated":true,"configured":true,"username":"admin"},"schema":{"$ref":"#/components/schemas/UIAuthStatusResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"summary":"Check admin login status","tags":["Admin auth"]}},"/ui/api/config":{"get":{"description":"Returns .env-backed configuration values for the control panel. Secret-looking values are masked in config fields.\n\nAuth: Admin session cookie","operationId":"getUIConfig","responses":{"200":{"content":{"application/json":{"example":{"aliases":[],"config":{"OPENAI_BASE_URL":"https://api.openai.com/v1","PROXY_API_KEY":"sk-...abcd"},"secrets":{"PROXY_API_KEY":"{{proxyApiKey}}"}},"schema":{"$ref":"#/components/schemas/UIConfigResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Read editable proxy config","tags":["Admin control panel"]},"post":{"description":"Persists selected .env values and model aliases. Restart the proxy to apply process-level settings.\n\nAuth: Admin session cookie","operationId":"saveUIConfig","requestBody":{"content":{"application/json":{"example":{"aliases":[{"Context":"1m","From":"sonnet[1m]","To":"gpt-5.5"}],"config":{"OPENAI_BASE_URL":"https://api.openai.com/v1"}},"schema":{"$ref":"#/components/schemas/UIConfigRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"message":"Configuration saved. Restart proxy to apply changes.","ok":true},"schema":{"$ref":"#/components/schemas/OKResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Save editable proxy config","tags":["Admin control panel"]}},"/ui/api/keys":{"get":{"description":"Auth: Admin session cookie","operationId":"getUIKeys","responses":{"200":{"content":{"application/json":{"example":{"clients":[],"defaults":{"anthropic_base":"https://proxy.example.com/anthropic","openai_local_url":"https://proxy.example.com/openai/v1"},"providers":[]},"schema":{"$ref":"#/components/schemas/UIKeysResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"List provider and client keys","tags":["Admin control panel"]}},"/ui/api/keys/client":{"post":{"description":"Auth: Admin session cookie","operationId":"createUIClientKey","requestBody":{"content":{"application/json":{"example":{"label":"Postman","provider":"default","provider_key_id":"","schema":"both"},"schema":{"$ref":"#/components/schemas/UIClientKeyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"api_key":"{{proxyApiKey}}","clients":[],"message":"Client key created. Copy it now; it will not be shown again.","ok":true,"providers":[]},"schema":{"$ref":"#/components/schemas/UIClientKeyCreateResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Create a local client API key","tags":["Admin control panel"]}},"/ui/api/keys/provider":{"post":{"description":"Auth: Admin session cookie","operationId":"saveUIProviderKey","requestBody":{"content":{"application/json":{"example":{"api_key":"{{providerApiKey}}","base_url":"https://api.openai.com/v1","label":"OpenAI key","provider":"openai"},"schema":{"$ref":"#/components/schemas/UIProviderKeyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"clients":[],"message":"Provider key saved.","ok":true,"providers":[]},"schema":{"$ref":"#/components/schemas/UIKeysResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Create or renew a provider key","tags":["Admin control panel"]}},"/ui/api/keys/toggle":{"post":{"description":"Auth: Admin session cookie","operationId":"toggleUIKey","requestBody":{"content":{"application/json":{"example":{"enabled":true,"id":"{{clientKeyId}}","kind":"client"},"schema":{"$ref":"#/components/schemas/UIKeyToggleRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"clients":[],"ok":true,"providers":[]},"schema":{"$ref":"#/components/schemas/UIKeysResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Enable or disable a key","tags":["Admin control panel"]}},"/ui/api/logs":{"get":{"description":"Auth: Admin session cookie","operationId":"getUILogs","responses":{"200":{"content":{"application/json":{"example":{"rows":[],"stderr":"","stdout":"","trace":""},"schema":{"$ref":"#/components/schemas/UILogsResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Read local logs","tags":["Admin control panel"]}},"/ui/api/models":{"get":{"description":"Auth: Admin session cookie","operationId":"getUIModels","responses":{"200":{"content":{"application/json":{"example":{"models":[{"alias":"sonnet[1m]","context":"1m","real":"gpt-5.5"}]},"schema":{"$ref":"#/components/schemas/UIModelsResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"List model aliases","tags":["Admin control panel"]},"post":{"description":"Auth: Admin session cookie","operationId":"saveUIModels","requestBody":{"content":{"application/json":{"example":{"models":[{"alias":"sonnet[1m]","context":"1m","real":"gpt-5.5"}]},"schema":{"$ref":"#/components/schemas/UIModelsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"message":"Model aliases saved and active for new requests.","models":[{"alias":"sonnet[1m]","context":"1m","real":"gpt-5.5"}],"ok":true},"schema":{"$ref":"#/components/schemas/UIModelsResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Save model aliases","tags":["Admin control panel"]}},"/ui/api/proxy/restart":{"post":{"description":"Auth: Admin session cookie","operationId":"restartProxy","responses":{"200":{"content":{"application/json":{"example":{"message":"Proxy restarting.","ok":true},"schema":{"$ref":"#/components/schemas/OKResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Restart proxy process","tags":["Admin control panel"]}},"/ui/api/proxy/start":{"post":{"description":"Auth: Admin session cookie","operationId":"startProxy","responses":{"200":{"content":{"application/json":{"example":{"message":"Proxy endpoints started. Claude settings applied.","ok":true,"running":true},"schema":{"$ref":"#/components/schemas/OKResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Start proxy endpoints","tags":["Admin control panel"]}},"/ui/api/proxy/stop":{"post":{"description":"Auth: Admin session cookie","operationId":"stopProxy","responses":{"200":{"content":{"application/json":{"example":{"message":"Proxy endpoints stopped. Claude settings restored. Control panel remains online.","ok":true,"running":false},"schema":{"$ref":"#/components/schemas/OKResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Stop proxy endpoints","tags":["Admin control panel"]}},"/ui/api/status":{"get":{"description":"Returns runtime status, local and public URLs, model rows, auth metadata, dashboard metrics, and the latest request summary.\n\nAuth: Admin session cookie","operationId":"getUIStatus","responses":{"200":{"content":{"application/json":{"example":{"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"},"schema":{"$ref":"#/components/schemas/UIStatusResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Get dashboard status","tags":["Admin control panel"]}},"/ui/api/test":{"post":{"description":"Auth: Admin session cookie","operationId":"testProxyRequest","requestBody":{"content":{"application/json":{"example":{"model":"{{model}}","prompt":"Reply with only OK.","stream":false},"schema":{"$ref":"#/components/schemas/UITestRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"duration_ms":450,"raw":"{\"type\":\"message\"}","status":200,"text":"OK"},"schema":{"$ref":"#/components/schemas/UITestResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Send a quick test prompt","tags":["Admin control panel"]}},"/ui/api/update/check":{"post":{"description":"Refreshes the configured VERSION URL and returns the current update status without starting an update.\n\nAuth: Admin session cookie","operationId":"checkDashboardUpdate","responses":{"200":{"content":{"application/json":{"example":{"message":"Update check complete.","ok":true,"update":{"current_version":"0.4.3","latest_version":"0.4.4","update_available":true}},"schema":{"$ref":"#/components/schemas/UIUpdateStartResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Check for updates","tags":["Admin control panel"]}},"/ui/api/update/settings":{"post":{"description":"Saves automatic-update, branch, VERSION URL, repository path, status-file path, and full-system updater options.\n\nAuth: Admin session cookie","operationId":"saveDashboardUpdateSettings","requestBody":{"content":{"application/json":{"example":{"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"},"schema":{"$ref":"#/components/schemas/UIUpdateSettingsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"auto_update":true,"full_system_update":false,"ok":true,"update":{"auto_update":true}},"schema":{"$ref":"#/components/schemas/UIUpdateSettingsResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Save update settings","tags":["Admin control panel"]}},"/ui/api/update/start":{"post":{"description":"Starts update-linux.sh in the background with a status file so the dashboard can reconnect after the service restarts.\n\nAuth: Admin session cookie","operationId":"startDashboardUpdate","responses":{"200":{"content":{"application/json":{"example":{"message":"Update started.","ok":true,"update":{"running":true,"state":"queued"}},"schema":{"$ref":"#/components/schemas/UIUpdateStartResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Start non-interactive update","tags":["Admin control panel"]}},"/ui/api/update/status":{"get":{"description":"Returns the installed version, latest GitHub version check, auto-update setting, and the last dashboard-started update status.\n\nAuth: Admin session cookie","operationId":"getUIUpdateStatus","responses":{"200":{"content":{"application/json":{"example":{"auto_update":false,"current_version":"0.4.3","latest_version":"0.4.4","running":false,"state":"idle","update_available":true},"schema":{"$ref":"#/components/schemas/UIUpdateStatusResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Get update status","tags":["Admin control panel"]}},"/ui/api/validate":{"get":{"description":"Auth: Admin session cookie","operationId":"validateProxy","responses":{"200":{"content":{"application/json":{"example":{"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"},"schema":{"$ref":"#/components/schemas/UIValidateResponse"}}},"description":"OK"},"default":{"content":{"application/json":{"example":{"error":"method not allowed"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Error response"}},"security":[{"AdminSessionCookie":[]}],"summary":"Run local validation checks","tags":["Admin control panel"]}}},"servers":[{"description":"Local proxy","url":"https://ai-api1.cus.cx"}],"tags":[{"name":"Documentation"},{"name":"Public"},{"name":"Anthropic-compatible"},{"name":"OpenAI-compatible"},{"name":"Admin auth"},{"name":"Admin control panel"}]}
