API Explorer
Interactive API reference generated from the Oxagen OpenAPI specification.
Interactive API Explorer
The Oxagen API is built with FastAPI, which auto-generates an OpenAPI 3.x specification. The interactive docs below are always in sync with the live public API.
Links
| Tool | URL |
|---|---|
| Swagger UI | api.oxagen.ai/docs |
| ReDoc | api.oxagen.ai/redoc |
| OpenAPI JSON | api.oxagen.ai/openapi.json |
Base URL
https://api.oxagen.aiAuthentication
Authorization: Bearer <your-token>Sign in at app.oxagen.ai and open Settings → API Keys to mint a workspace-scoped bearer token. Each key has a name, a scope set, and can be revoked at any time. The secret is shown once at creation; Oxagen stores only a hash thereafter.
MCP clients receive credentials directly from the installer.
Code Samples
Python — Add to the graph and query
import requests
BASE = "https://api.oxagen.ai/v1"
headers = {"Authorization": "Bearer <token>"}
# 1. Add something to your knowledge graph
requests.post(f"{BASE}/ontology/prompt", headers=headers, json={
"prompt": "Met with Alex Kim (alex@fintech.io) today, CEO of FinCo. "
"They're ready to sign a $50k enterprise deal."
})
# 2. Ask a question
resp = requests.post(f"{BASE}/ontology/prompt", headers=headers, json={
"prompt": "Which enterprise deals are close to closing?"
})
print(resp.json()["answer"])Python — Semantic search with type filter
import requests
BASE = "https://api.oxagen.ai/v1"
headers = {"Authorization": "Bearer <token>"}
resp = requests.post(f"{BASE}/ontology/search", headers=headers, json={
"q": "fintech companies I spoke with last month",
"top_k": 10,
"mode": "hybrid",
"filters": {"type": ["organization", "meeting"]},
})
for result in resp.json()["results"]:
print(f"{result['node']['name']} score={result['score']:.2f}")JavaScript — List nodes by type
const BASE = "https://api.oxagen.ai/v1";
const token = "your-token";
const resp = await fetch(
`${BASE}/ontology/nodes?type=person&limit=20`,
{ headers: { Authorization: `Bearer ${token}` } }
);
const people = await resp.json();
console.log(`${people.length} people in your graph`);cURL — Create a typed node and edge
# Create a person node
curl -X POST https://api.oxagen.ai/v1/ontology/nodes \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"type": "Person",
"title": "Sarah Chen",
"properties": { "email": "sarah@acme.com" }
}'
# Connect it to an existing organization
curl -X POST https://api.oxagen.ai/v1/ontology/edges \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"type": "works_at",
"source_id": "<person_node_id>",
"target_id": "<organization_node_id>"
}'Endpoint Groups
| Group | Base Path | Description |
|---|---|---|
| Ontology | /v1/ontology/* | Knowledge graph — nodes, edges, types, search |
| MCP | /v1/mcp/* | Model Context Protocol token endpoint |
| Health | /health, /health/ready | Service health checks |
Error Reference
| Status | Meaning |
|---|---|
| 400 | Bad request — check your request body |
| 401 | Missing or invalid token |
| 402 | Account locked or insufficient credits |
| 403 | Insufficient permissions |
| 404 | Not found, or not visible to your workspace |
| 409 | Conflict — duplicate slug, limit exceeded, etc. |
| 422 | Validation error — check the detail field for field-level errors |
| 429 | Rate limited — slow down and retry |
| 500 | Internal server error |
| 502 | External service unavailable |