{"openapi":"3.1.0","info":{"title":"Unjailed AI inference API","version":"1.0.0","description":"Text Chat Completions and model listing. The API does not execute local tools. Pricing and capability metadata: /models.json."},"servers":[{"url":"https://unjailedai.com"}],"security":[{"apiKey":[]}],"paths":{"/v1/models":{"get":{"operationId":"listModels","summary":"List exact model IDs","responses":{"200":{"description":"OpenAI-style model list","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["glm-5.3","glm-5.3-uncensored","glm-5.3-flash","glm-5.3-flash-uncensored","glm-5.3-abliterated","glm-5.3-flash-abliterated","glm-5.2","deepseek-v4.1-flash","deepseek-v4-flash-0731","deepseek-v4-pro-0813","deepseek-v4-pro-uncensored","kimi-k3","gpt-6-astra","claude-fable-5","claude-opus-5-5","claude-opus-5","claude-opus-4-8","claude-opus-4-7","claude-opus-4-6","claude-sonnet-5-5","claude-haiku-5-5","claude-sonnet-5","gpt-5.5","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-6-sol","gpt-6.1-sol","gpt-6-luna","grok-4.7","grok-4.6","grok-4.5"]},"object":{"const":"model"},"owned_by":{"const":"unjailed"}}}}}}}}},"401":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"}}}}}}}}}}},"/v1/chat/completions":{"post":{"operationId":"createChatCompletion","summary":"Text completion, optionally streamed","parameters":[{"name":"x-unjailed-funding","in":"header","required":false,"description":"Override the account funding default for this request. Top-up credit has no subscription daily cap; both sources require available funds.","schema":{"type":"string","enum":["subscription","topup"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionRequest"}}}},"responses":{"200":{"description":"JSON completion or SSE chunks; SSE ends with data: [DONE]. Ignore comment heartbeats. A usage chunk is emitted when requested.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"chat.completion"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object"}},"usage":{"type":"object"}}}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"}}}}}}}},"401":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"}}}}}}}},"402":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"}}}}}}}},"404":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"}}}}}}}},"429":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"}}}}}}}},"451":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"}}}}}}}},"502":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"}}}}}}}},"503":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string"}}}}}}}}}}},"/models.json":{"get":{"operationId":"publicCatalog","summary":"Public pricing and capabilities","security":[],"responses":{"200":{"description":"Same-source catalog used by the directory","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"families":{"type":"array","items":{"type":"object"}},"models":{"type":"array","items":{"type":"object"}}}}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Your own Unjailed API key; keep it private."}},"schemas":{"CompletionRequest":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","enum":["glm-5.3","glm-5.3-uncensored","glm-5.3-flash","glm-5.3-flash-uncensored","glm-5.3-abliterated","glm-5.3-flash-abliterated","glm-5.2","deepseek-v4.1-flash","deepseek-v4-flash-0731","deepseek-v4-pro-0813","deepseek-v4-pro-uncensored","kimi-k3","gpt-6-astra","claude-fable-5","claude-opus-5-5","claude-opus-5","claude-opus-4-8","claude-opus-4-7","claude-opus-4-6","claude-sonnet-5-5","claude-haiku-5-5","claude-sonnet-5","gpt-5.5","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gpt-6-sol","gpt-6.1-sol","gpt-6-luna","grok-4.7","grok-4.6","grok-4.5"]},"messages":{"type":"array","minItems":1,"description":"Text messages. Server retains up to 100 and clips oversized text fields.","items":{"type":"object","required":["role"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"type":["string","null"]},"tool_calls":{"type":"array","items":{"type":"object"}},"tool_call_id":{"type":"string"}}}},"stream":{"type":"boolean","default":false},"max_tokens":{"type":"integer","minimum":1,"maximum":32768},"max_completion_tokens":{"type":"integer","minimum":1,"maximum":32768,"description":"Takes precedence over max_tokens."},"temperature":{"type":"number","minimum":0,"maximum":2},"tools":{"type":"array","maxItems":64,"items":{"type":"object","properties":{"type":{"const":"function"},"function":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object"}}}}}},"tool_choice":{"oneOf":[{"type":"string","enum":["auto","none","required"]},{"type":"object"}]},"reasoning_effort":{"type":"string","enum":["none","minimal","low","medium","high","max","xhigh","auto"],"description":"GLM maps medium to high, none/minimal to low, and xhigh to max. Reasoning cannot be assumed disabled."},"stream_options":{"type":"object","properties":{"include_usage":{"type":"boolean"}}}}}}}}