Oxagen Docs

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.

Base URL

https://api.oxagen.ai

Authentication

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

GroupBase PathDescription
Ontology/v1/ontology/*Knowledge graph — nodes, edges, types, search
MCP/v1/mcp/*Model Context Protocol token endpoint
Health/health, /health/readyService health checks

Error Reference

StatusMeaning
400Bad request — check your request body
401Missing or invalid token
402Account locked or insufficient credits
403Insufficient permissions
404Not found, or not visible to your workspace
409Conflict — duplicate slug, limit exceeded, etc.
422Validation error — check the detail field for field-level errors
429Rate limited — slow down and retry
500Internal server error
502External service unavailable

On this page