Sageox LLM API
OpenAI-compatible chat completion endpoints. Proxies requests to configured LLM providers (Bedrock, OpenAI) with model routing, token usage tracking, and streaming support. Follows the OpenAI `/v1/chat/completions` format.
OpenAI-compatible chat completion endpoints. Proxies requests to configured LLM providers (Bedrock, OpenAI) with model routing, token usage tracking, and streaming support. Follows the OpenAI `/v1/chat/completions` format.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/sageox-llm-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: SageOx LLM API
version: 1.0.0
description: '# API Reference
## Overview
SageOx is a platform that captures team knowledge from discussions, decisions, and work context into a Ledger (per-repo historical record) and Team Context (team-wide shared knowledge).'
contact:
name: SageOx Team
license:
name: MIT
servers:
- url: http://localhost:3000
description: Devcontainer
- url: https://test.sageox.ai
description: Test
- url: https://sageox.ai
description: Production
security:
- bearerAuth: []
tags:
- name: LLM
description: OpenAI-compatible chat completion endpoints. Proxies requests to configured LLM providers (Bedrock, OpenAI) with model routing, token usage tracking, and streaming support. Follows the OpenAI `/v1/chat/completions` format.
paths:
/v1/models:
get:
operationId: listModels
summary: List available models
description: List all available LLM models that can be used for chat completions
tags:
- LLM
security:
- bearerAuth: []
responses:
'200':
description: List of available models
content:
application/json:
schema:
type: object
required:
- object
- data
properties:
object:
type: string
enum:
- list
example: list
data:
type: array
items:
type: object
required:
- id
- object
- created
- owned_by
properties:
id:
type: string
description: Model identifier
example: gpt-4
object:
type: string
enum:
- model
example: model
created:
type: integer
description: Unix timestamp of when the model was created
example: 1677610602
owned_by:
type: string
description: Organization that owns the model
example: sageox
'401':
description: Unauthorized - Invalid or missing bearer token
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAIError'
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAIError'
/v1/chat/completions:
post:
operationId: createChatCompletion
summary: Create chat completion
description: 'Create a chat completion using OpenAI-compatible API format.
Supports both streaming and non-streaming responses.
For streaming responses, set `stream: true` in the request body.
The response will be a text/event-stream with Server-Sent Events (SSE).'
tags:
- LLM
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- model
- messages
properties:
model:
type: string
description: ID of the model to use
example: gpt-4
messages:
type: array
description: List of messages in the conversation
minItems: 1
items:
type: object
required:
- role
- content
properties:
role:
type: string
enum:
- system
- user
- assistant
description: Role of the message author
example: user
content:
type: string
description: Content of the message
example: Hello, how are you?
stream:
type: boolean
description: Whether to stream the response using SSE
default: false
example: false
temperature:
type: number
description: Sampling temperature between 0 and 2
minimum: 0
maximum: 2
default: 1
example: 0.7
max_tokens:
type: integer
description: Maximum number of tokens to generate
minimum: 1
example: 1000
top_p:
type: number
description: Nucleus sampling parameter
minimum: 0
maximum: 1
example: 1
frequency_penalty:
type: number
description: Frequency penalty between -2.0 and 2.0
minimum: -2
maximum: 2
default: 0
example: 0
presence_penalty:
type: number
description: Presence penalty between -2.0 and 2.0
minimum: -2
maximum: 2
default: 0
example: 0
stop:
oneOf:
- type: string
- type: array
items:
type: string
description: Up to 4 sequences where the API will stop generating
example:
- \n
n:
type: integer
description: Number of completions to generate
minimum: 1
maximum: 10
default: 1
example: 1
user:
type: string
description: Unique identifier for the end-user
example: user-12345
responses:
'200':
description: Chat completion response
content:
application/json:
schema:
type: object
required:
- id
- object
- created
- model
- choices
- usage
properties:
id:
type: string
description: Unique identifier for the completion
example: chatcmpl-abc123
object:
type: string
enum:
- chat.completion
example: chat.completion
created:
type: integer
description: Unix timestamp of when the completion was created
example: 1677858242
model:
type: string
description: Model used for the completion
example: gpt-4
choices:
type: array
description: List of completion choices
items:
type: object
required:
- index
- message
- finish_reason
properties:
index:
type: integer
description: Index of the choice
example: 0
message:
type: object
required:
- role
- content
properties:
role:
type: string
enum:
- assistant
example: assistant
content:
type: string
description: Generated message content
example: Hello! I'm doing well, thank you for asking.
finish_reason:
type: string
enum:
- stop
- length
- content_filter
- null
description: Reason why the completion finished
example: stop
usage:
type: object
required:
- prompt_tokens
- completion_tokens
- total_tokens
properties:
prompt_tokens:
type: integer
description: Number of tokens in the prompt
example: 10
completion_tokens:
type: integer
description: Number of tokens in the completion
example: 12
total_tokens:
type: integer
description: Total number of tokens used
example: 22
text/event-stream:
schema:
type: string
description: 'Server-Sent Events stream (when stream=true).
Each event is a JSON object representing a chunk of the completion.
Format:
data: {"id":"chatcmpl-abc123","object":"chat.completion.chunk","created":1677858242,"model":"gpt-4","choices":[{"index":0,"delta":{"role":"assistant","content":"Hello"},"finish_reason":null}]}
The stream ends with:
data: [DONE]
'
example: 'data: {"id":"chatcmpl-abc123","object":"chat.completion.chunk","created":1677858242,"model":"gpt-4","choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null}]}
data: {"id":"chatcmpl-abc123","object":"chat.completion.chunk","created":1677858242,"model":"gpt-4","choices":[{"index":0,"delta":{"content":"Hello"},"finish_reason":null}]}
data: {"id":"chatcmpl-abc123","object":"chat.completion.chunk","created":1677858242,"model":"gpt-4","choices":[{"index":0,"delta":{"content":"!"},"finish_reason":null}]}
data: {"id":"chatcmpl-abc123","object":"chat.completion.chunk","created":1677858242,"model":"gpt-4","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}
data: [DONE]
'
'400':
description: Bad request - Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAIError'
example:
error:
message: Invalid request body
type: invalid_request_error
code: invalid_request
'401':
description: Unauthorized - Invalid or missing bearer token
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAIError'
example:
error:
message: Invalid authentication
type: invalid_request_error
code: invalid_api_key
'429':
description: Rate limit exceeded
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAIError'
example:
error:
message: Rate limit exceeded
type: rate_limit_error
code: rate_limit_exceeded
'500':
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAIError'
example:
error:
message: Internal server error
type: server_error
code: server_error
components:
schemas:
OpenAIError:
type: object
description: Error response following the OpenAI error format. Returned by LLM endpoints.
required:
- error
properties:
error:
type: object
description: Error details object.
required:
- message
- type
properties:
message:
type: string
description: Human-readable error description.
example: Invalid API key
type:
type: string
description: 'Error category. Common values: `invalid_request_error`, `authentication_error`, `rate_limit_error`.'
example: invalid_request_error
code:
type: string
nullable: true
description: Machine-readable error code for programmatic handling. `null` when no specific code applies.
example: invalid_api_key
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: 'JWT token obtained from the auth service (/api/auth/token).
Token is validated using JWKS from the auth service.
Required claims: sub (user_id), email, name, tier.
'