WEB6 API Reference
One API, every AI. All 35+ endpoints of the OASIS WEB6 unified AI gateway — request shapes, field types, and response structures.
Authorization: Bearer <JWT> or X-Api-Key: <key>. Get yours at OPORTAL.
Completions
POST /v1/complete
| Field | Type | Description |
|---|---|---|
| messagesrequired | array | Array of {"role":"user|assistant|system","content":"..."} objects |
| provider | string | Target provider: openai, anthropic, gemini, groq, mistral, cohere, xai, deepseek, ollama, awsbedrock, azureopenai, auto (default) |
| model | string | Model ID e.g. gpt-4o, claude-sonnet-5. Default: auto |
| avatarId | string (uuid) | OASIS avatar ID for karma-gated access and usage metering |
| useFAHRN | boolean | Run the last user message through the FAHRN reasoning network and inject the plan into context |
| useHolonicBraid | boolean | Inject the shared Holonic BRAID reasoning graph for the detected task type |
| injectAvatarContext | boolean | Prepend this avatar's identity/karma context to the system prompt |
| tools | array | Tool definitions (OpenAI-compatible function calling schema) |
| temperature | number | 0–2. Default provider-specific |
| maxTokens | integer | Max completion tokens |
| routing | object | Advanced routing overrides e.g. {"useOpenServ":true} |
{
"provider": "auto",
"model": "auto",
"messages": [
{"role": "system", "content": "You are a helpful OASIS guide."},
{"role": "user", "content": "What is holonic memory?"}
]
}
POST /v1/complete/stream
/v1/complete but returns a text/event-stream SSE response. Each data: line is a JSON completion chunk; the final chunk has "done":true.data: {"content":"Once ","done":false}
data: {"content":"upon ","done":false}
data: {"content":"a time...","done":false}
data: {"content":"","done":true,"promptTokens":12,"completionTokens":47}
POST /v1/complete/tool-result
role:"tool" result messages. Use this for agentic tool-calling loops.Embeddings
POST /v1/embeddings
| Field | Type | Description |
|---|---|---|
| textsrequired | string[] | One or more strings to embed |
| provider | string | e.g. openai, cohere, auto |
| model | string | e.g. text-embedding-3-large |
Image Generation
POST /v1/images/generate
| Field | Type | Description |
|---|---|---|
| promptrequired | string | Image description |
| provider | string | e.g. openai, stability, auto |
| width | integer | Output width in pixels |
| height | integer | Output height in pixels |
| n | integer | Number of images (default 1) |
Video Generation
POST /v1/video/generate
callbackUrl for webhook notification.| Field | Type | Description |
|---|---|---|
| promptrequired | string | Video description |
| provider | string | e.g. runwayml, lumaai, auto |
| imageUrl | string | Seed image URL for image-to-video |
| duration | integer | Duration in seconds |
| aspectRatio | string | e.g. 16:9, 9:16, 1:1 |
| callbackUrl | string | Webhook URL to receive completion POST when rendering finishes |
Audio
POST /v1/audio/speech
| Field | Type | Description |
|---|---|---|
| textrequired | string | Text to synthesise |
| voice | string | Voice ID e.g. alloy, nova, shimmer |
| provider | string | e.g. openai, elevenlabs, auto |
POST /v1/audio/transcriptions
| Field | Type | Description |
|---|---|---|
| filerequired | multipart file | Audio file (.mp3, .wav, .m4a, etc.) |
| language | string | ISO-639-1 code e.g. en, fr |
Search
POST /v1/search
| Field | Type | Description |
|---|---|---|
| queryrequired | string | Search query |
| provider | string | e.g. tavily, serper, exa, auto |
| maxResults | integer | Max results to return (default 10) |
Reranking
POST /v1/rerank
| Field | Type | Description |
|---|---|---|
| queryrequired | string | Query to rank against |
| documentsrequired | string[] | Documents to rerank |
| topN | integer | Number of top results to return (default 5) |
| provider | string | e.g. cohere, auto |
Moderation
POST /v1/moderation
| Field | Type | Description |
|---|---|---|
| textrequired | string | Text to check |
| provider | string | e.g. openai, llamaguard, auto |
Translation
POST /v1/translate
| Field | Type | Description |
|---|---|---|
| textrequired | string | Source text |
| targetLanguagerequired | string | ISO-639-1 e.g. fr, de, ja |
| sourceLanguage | string | Auto-detected if omitted |
| provider | string | e.g. deepl, googletranslate, auto |
Classification
POST /v1/classify
| Field | Type | Description |
|---|---|---|
| textrequired | string | Text to classify |
| labelsrequired | string[] | Candidate labels e.g. ["positive","negative","neutral"] |
| provider | string | e.g. cohere, auto |
Structured Extraction
POST /v1/extract
| Field | Type | Description |
|---|---|---|
| textrequired | string | Source text |
| schemarequired | object | JSON schema describing the target structure |
| provider | string | e.g. openai, auto |
Document Processing
POST /v1/documents/parse
| Field | Type | Description |
|---|---|---|
| filerequired | multipart file | Document file (.pdf, .docx, .txt, etc.) |
| provider | string | e.g. llamaparse, auto |
Code Execution
POST /v1/code/execute
| Field | Type | Description |
|---|---|---|
| coderequired | string | Code to execute |
| language | string | python, javascript, bash (default: python) |
| provider | string | Execution sandbox provider |
Batch Processing
POST /v1/batch/submit
callbackUrl for webhook notification when complete.| Field | Type | Description |
|---|---|---|
| requestsrequired | array | Array of completion request objects |
| provider | string | e.g. openai, anthropic, auto |
| callbackUrl | string | Webhook URL for completion notification |
GET /v1/batch/{batchId}/status
| Param | Type | Description |
|---|---|---|
| batchId | path string | Batch ID returned by /v1/batch/submit |
| provider | query string | Provider that owns the batch job |
Memory
POST /v1/memory/store
| Field | Type | Description |
|---|---|---|
| contentrequired | string | Content to store |
| userId | string | User/avatar identifier |
| provider | string | e.g. mem0, zep, auto |
POST /v1/memory/query
| Field | Type | Description |
|---|---|---|
| queryrequired | string | Query to search |
| userId | string | Scope to a specific user |
| provider | string | Memory provider |
Guardrails
POST /v1/guardrails/check
| Field | Type | Description |
|---|---|---|
| textrequired | string | Input to check |
| provider | string | e.g. nemo, auto |
Fine-Tuning
POST /v1/fine-tuning/jobs
callbackUrl to receive a webhook when training completes.| Field | Type | Description |
|---|---|---|
| baseModelrequired | string | Base model ID to fine-tune |
| trainingDatarequired | array | Array of training examples |
| provider | string | e.g. openai, togetherai, mistral |
| callbackUrl | string | Webhook URL for training completion |
GET /v1/fine-tuning/jobs/{jobId}
GraphRAG
POST /v1/graphrag/query
| Field | Type | Description |
|---|---|---|
| queryrequired | string | Natural language query |
| provider | string | e.g. thegraph, neo4j, auto |
Prompt Optimisation
POST /v1/prompts/optimise
| Field | Type | Description |
|---|---|---|
| promptrequired | string | Original prompt |
| provider | string | Optimisation provider |
FAHRN — Reasoning Network
POST /v1/reasoning-network/dispatch
| Field | Type | Description |
|---|---|---|
| problemrequired | string | The problem or question to solve |
| taskType | string | Task hint e.g. general, code, research, creative |
| mode | string | Serial (default), Parallel, Hybrid |
Model Catalogue
GET /v1/models
| Param | Type | Description |
|---|---|---|
| plan | query string | Filter to models accessible on this plan: Free, Bronze, Silver, Gold |
{
"total": 23,
"models": [
{
"id": "gpt-4o",
"name": "GPT-4o",
"providerName": "OpenAI",
"minPlanLabel": "Bronze",
"inputPer1kUSD": 0.0025,
"outputPer1kUSD": 0.01,
"contextWindow": 128000,
"supportsVision": true,
"supportsFunctions": true
}
]
}
GET /v1/models/{modelId}
Provider Status
GET /v1/providers
Cost Estimate
POST /v1/estimate
| Field | Type | Description |
|---|---|---|
| providerrequired | string | Provider ID e.g. openai |
| modelrequired | string | Model ID e.g. gpt-4o |
| promptTokensrequired | integer | Expected prompt token count |
| completionTokens | integer | Expected completion token count (default 0) |
{ "estimatedUSD": 0.001250, "note": "Based on gpt-4o pricing at $0.0025/1K in + $0.01/1K out" }
Usage
GET /v1/usage
| Param | Type | Description |
|---|---|---|
| plan | query string | Subscription plan for limit calculation: Free, Bronze, Silver, Gold, Enterprise |
| karma | query integer | Avatar karma score for multiplier calculation |
{
"dailyCallsUsed": 47,
"dailyCallLimit": 1500,
"remainingCallsToday": 1453,
"karmaMultiplier": 3.0,
"monthlySpendUSD": 0.042,
"dailyTokensUsed": 185000,
"periodMonth": "2026-08",
"periodDay": "2026-08-23"
}
Health
GET /v1/health
{
"status": "ok",
"version": "2.0",
"timestamp": "2026-08-23T10:00:00.0000000Z"
}
OpenServ
GET /v1/openserv/models
[
{
"id": "oasis-web6/gpt-4o",
"name": "GPT-4o via WEB6",
"provider": "openai",
"contextWindow": 128000,
"capabilities": ["chat", "tools", "vision"]
},
...
]
Orchestrators
Route multi-agent orchestration frameworks through WEB6. Each endpoint translates a framework-native payload into WEB6 completions and returns results in the originating framework's expected shape — no framework SDK required.
POST /v1/orchestrate/crewai
| Field | Type | Description |
|---|---|---|
| tasksrequired | array | Array of task objects with id, agent, description, expected_output |
| process | string | sequential (default) or hierarchical |
| provider | string | Force all agents to a specific WEB6 provider (default: auto) |
{
"process": "sequential",
"tasks": [
{
"id": "research",
"agent": "Researcher",
"description": "Find the top 3 OASIS providers for video generation",
"expected_output": "A ranked list with reasons"
},
{
"id": "write",
"agent": "Writer",
"description": "Turn the research findings into a blog section",
"expected_output": "200-word blog paragraph"
}
]
}
POST /v1/orchestrate/autogen
initial_message through WEB6 and returns a reply in AutoGen's expected assistant-message shape.| Field | Type | Description |
|---|---|---|
| initial_messagerequired | string | The opening user message to start the AutoGen conversation |
| system_message | string | System/assistant persona to set for the WEB6 agent |
| provider | string | WEB6 provider to use (default: auto) |
| model | string | Model ID override (default: auto) |
| max_rounds | integer | Maximum conversation rounds (default: 10) |
POST /v1/orchestrate/langgraph
| Field | Type | Description |
|---|---|---|
| node_namerequired | string | The LangGraph node identifier to execute |
| state | object | Current graph state (key-value pairs, passed through and augmented) |
| messages | array | Message history to pass to the LLM for this node |
| next_node | string | Next node to route to (returned in response for the graph executor) |
| provider | string | WEB6 provider (default: auto) |
{
"isError": false,
"result": {
"state": {
"research_output": "...",
"__node__": "research",
"__timestamp__": "2026-08-23T10:00:00Z"
},
"nextNode": "summarise"
}
}
MCP — Model Context Protocol
WEB6 exposes its full capability surface as an MCP server, making every tool callable directly from Claude Code, claude.ai connectors, OpenAI Responses API, and any other MCP-compatible client — with zero HTTP configuration required.
https://api.web6.oasisomniverse.one/.well-known/agent.json
Connect in Claude Code:
claude mcp add oasis-web6 \ --transport http \ --url https://api.web6.oasisomniverse.one/mcp \ --header "Authorization: Bearer <your-jwt>"
Or in ~/.claude/claude_desktop_config.json:
{
"mcpServers": {
"oasis-web6": {
"transport": "http",
"url": "https://api.web6.oasisomniverse.one/mcp",
"headers": { "Authorization": "Bearer <your-jwt>" }
}
}
}
MCP Tool Reference
All 35+ tools exposed by the MCP server. Each tool is callable from any MCP client — Claude Code, claude.ai, OpenAI, or your own agent.
Rate Limits & Headers
Every response includes rate-limit context headers:
Quota exceeded returns HTTP 429 with Retry-After seconds until midnight UTC.
All responses use the OASISResult envelope:
{
"isError": false,
"message": null,
"result": { /* endpoint-specific data */ }
}
Webhook Delivery & HMAC Signing
Async endpoints (video generation, batch jobs, fine-tuning) accept a callbackUrl field. When the job completes, WEB6 POSTs a signed WebhookPayload to that URL:
{
"jobId": "abc123",
"jobType": "video",
"status": "completed",
"result": { /* job-specific result */ },
"error": null,
"completedAtUtc": "2026-08-23T10:05:22Z"
}
When the WEB6_WEBHOOK_SECRET environment variable is set on the server, every delivery also includes:
Verify the signature in your callback endpoint:
# Python verification example
import hmac, hashlib
def verify_webhook(body: bytes, signature: str, secret: str) -> bool:
expected = "sha256=" + hmac.new(
secret.encode(), body, hashlib.sha256
).hexdigest()
return hmac.compare_digest(expected, signature)