{"openapi":"3.1.0","info":{"title":"Frontière AI","description":"EU sovereign OpenAI-compatible AI gateway. Drop-in replacement for any OpenAI-compatible client: change `base_url` to https://getfrontiereai.eu/api/v1 and use your `sk-front-` API key. Prepaid credit model (minimum EUR 10), no subscription. All models labeled as EU sovereign or not.\n\n**Key features:**\n- EU data residency (OVHcloud, Scaleway, self-hosted)\n- Zero prompt retention — prompts are not stored or used for training\n- AI Act-ready positioning with per-model compliance data\n- Streaming via SSE with usage included in the final chunk\n- Tool calling support measured per model","version":"1.0.0","contact":{"name":"Frontière AI","url":"https://getfrontiereai.eu"}},"servers":[{"url":"https://getfrontiereai.eu/api/v1","description":"Production API"}],"paths":{"/models":{"get":{"operationId":"listModels","summary":"List available models","description":"Returns all live models (chat + embedding) with pricing, sovereignty status, compliance data, and tool calling support. Filter with `?kind=chat` or `?kind=embedding`. Add `?include=all` to include coming-soon models.","parameters":[{"name":"kind","in":"query","schema":{"type":"string","enum":["chat","embedding"]},"description":"Filter by model kind. Omit for all kinds."},{"name":"include","in":"query","schema":{"type":"string","enum":["all"]},"description":"Set to 'all' to include coming-soon models."}],"responses":{"200":{"description":"List of models","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","description":"Model entry — schema varies by kind (chat or embedding). See inline properties."}}},"required":["object","data"]}}}}},"tags":["Models"]}},"/chat/completions":{"post":{"operationId":"createChatCompletion","summary":"Create a chat completion","description":"OpenAI-compatible chat completions endpoint. Supports streaming (SSE), tool calling, and per-model pricing. Set `stream: true` for SSE streaming with usage in the final chunk.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","description":"Model slug (from GET /models). Example: \"glm-5.2\""},"messages":{"type":"array","description":"Conversation messages","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text","image_url"]},"text":{"type":"string"},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}}}}}}]},"name":{"type":"string","description":"For tool role: the tool name"},"tool_call_id":{"type":"string","description":"For tool role: the tool call ID"},"tool_calls":{"type":"array","description":"For assistant role with tool calls","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}}}}}}}}},"temperature":{"type":"number","description":"Sampling temperature (0-2)","minimum":0,"maximum":2},"max_tokens":{"type":"integer","description":"Maximum tokens in the completion (clamped to model limit)"},"max_completion_tokens":{"type":"integer","description":"Alias for max_tokens"},"top_p":{"type":"number","description":"Nucleus sampling parameter"},"stream":{"type":"boolean","description":"Enable SSE streaming"},"stream_options":{"type":"object","properties":{"include_usage":{"type":"boolean","description":"Include usage stats in the final SSE chunk"}}},"tools":{"type":"array","description":"Tool definitions for function calling","items":{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object"}}}}}},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Sequences where the API will stop generating"},"presence_penalty":{"type":"number"},"frequency_penalty":{"type":"number"}}}}}},"responses":{"200":{"description":"Chat completion response (non-streamed) or SSE stream","content":{"application/json":{"schema":{"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":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"type":"string","nullable":true},"tool_calls":{"type":"array"},"refusal":{"type":"string","nullable":true}}},"finish_reason":{"type":"string","enum":["stop","length","tool_calls","content_filter"]}}}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}}}}},"text/event-stream":{"schema":{"type":"string","description":"SSE stream of chat completion chunks. Final chunk includes usage when stream_options.include_usage is true."}}}},"400":{"description":"Invalid request (missing model field, malformed body)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Insufficient credit balance — top up from the dashboard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown model slug","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Model exists but is coming-soon (not yet active)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream provider not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"BearerAuth":[]}],"tags":["Chat"]}},"/embeddings":{"post":{"operationId":"createEmbedding","summary":"Create embeddings","description":"OpenAI-compatible embeddings endpoint. Returns vector representations for RAG, semantic search, and classification. Use GET /models?kind=embedding to list available embedding models.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","input"],"properties":{"model":{"type":"string","description":"Embedding model slug (from GET /models?kind=embedding)"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"array","items":{"type":"array","items":{"type":"integer"}}}],"description":"Text(s) to embed. Accepts a string, array of strings, or array of token IDs."},"encoding_format":{"type":"string","enum":["float","base64"],"description":"Output encoding format"},"dimensions":{"type":"integer","description":"Truncate output to this many dimensions (if the model supports it)"}}}}}},"responses":{"200":{"description":"Embedding response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"object":{"type":"string","enum":["embedding"]},"embedding":{"type":"array","items":{"type":"number"},"description":"Vector of floats"}}}},"model":{"type":"string"},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}}}}}}},"400":{"description":"Invalid request (missing model or input field)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Insufficient credit balance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Unknown embedding model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Model coming-soon","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Upstream provider not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"BearerAuth":[]}],"tags":["Embeddings"]}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"sk-front-","description":"API key in Authorization header: `Bearer sk-front-...`. Create keys at /dashboard/keys."}},"schemas":{"ErrorResponse":{"type":"object","description":"OpenAI-compatible error response","required":["error"],"properties":{"error":{"type":"object","required":["message","type"],"properties":{"message":{"type":"string","description":"Human-readable error message"},"type":{"type":"string","enum":["invalid_api_key","insufficient_credit","invalid_request","model_not_found","model_not_live","provider_not_configured","upstream_error","aborted"],"description":"Machine-readable error type"},"param":{"type":"string","nullable":true,"description":"Parameter that caused the error (if applicable)"},"code":{"type":"string","nullable":true,"description":"Additional error code from upstream (if applicable)"}}}}}}},"tags":[{"name":"Models","description":"Model catalog — list available models with pricing and compliance data"},{"name":"Chat","description":"Chat completions — OpenAI-compatible conversational AI"},{"name":"Embeddings","description":"Embeddings — vector representations for RAG and semantic search"}]}