{"openapi":"3.1.0","info":{"title":"OfoxAI API","version":"1.0.0","description":"Unified LLM API Gateway — access GPT-6 Sol, Claude Opus 5.5, Gemini 3.5 Flash, DeepSeek V4 Pro and 100+ AI models through OpenAI/Anthropic/Gemini compatible endpoints. Works with CherryStudio, Claude Code, Chatbox, Cline, Codex, Zed.","contact":{"name":"OfoxAI","url":"https://ofox.ai"},"license":{"name":"Proprietary","url":"https://ofox.ai/terms"}},"servers":[{"url":"https://api.ofox.ai/v1","description":"Global - OpenAI Compatible"},{"url":"https://api.ofox.ai/anthropic","description":"Global - Anthropic Compatible"},{"url":"https://api.ofox.ai/gemini","description":"Global - Gemini Compatible"},{"url":"https://api.ofox.ai/v1","description":"China - OpenAI Compatible (Accelerated)"}],"security":[{"bearerAuth":[]}],"paths":{"/chat/completions":{"post":{"operationId":"createChatCompletion","summary":"Create chat completion","description":"Creates a chat completion for the provided messages. Compatible with OpenAI Chat Completions API.","tags":["Chat"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionResponse"}}}}}}},"/models":{"get":{"operationId":"listModels","summary":"List available models","description":"Returns a list of available AI models.","tags":["Models"],"responses":{"200":{"description":"List of models","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"}}}}}}},"/embeddings":{"post":{"operationId":"createEmbedding","summary":"Create embeddings","description":"Creates an embedding vector for the input text.","tags":["Embeddings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingRequest"}}}},"responses":{"200":{"description":"Embedding response"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"OfoxAI API Key"}},"schemas":{"ChatCompletionRequest":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","description":"Model ID (e.g., openai/gpt-6-sol, anthropic/claude-opus-5.5)","example":"openai/gpt-6-sol"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"temperature":{"type":"number","minimum":0,"maximum":2,"default":1},"max_tokens":{"type":"integer","description":"Maximum tokens in response"},"stream":{"type":"boolean","default":false}}},"Message":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"type":"string"}}},"ChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"created":{"type":"integer"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"$ref":"#/components/schemas/Message"},"finish_reason":{"type":"string"}}}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}}}},"ModelList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"owned_by":{"type":"string"}}}}}},"EmbeddingRequest":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string"},"input":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}}}},"tags":[{"name":"Chat","description":"Chat completion endpoints"},{"name":"Models","description":"Model listing and info"},{"name":"Embeddings","description":"Text embedding endpoints"}],"externalDocs":{"description":"Full API Documentation","url":"https://ofox.ai/docs"}}