Reference
·
8 min min read
API Reference
Overview
The Mycelis API is fully compatible with the OpenAI Chat Completions API. Any SDK, tool, or integration that works with OpenAI works with Mycelis.
Official OpenAI endpoint and parameter docs: platform.openai.com/docs/api-reference
Authentication
Authorization: Bearer myk_...
Create API keys in Dashboard → API Keys.
Base URL
https://your-domain.com/api/proxy/v1
Use your Mycelis agent/deployment slug as model.
Chat Completions example
POST /api/proxy/v1/chat/completions
Authorization: Bearer myk_...
Content-Type: application/json
{
"model": "my-agent",
"messages": [
{ "role": "user", "content": "What is RAG?" }
]
}
Supported parameters
| Parameter | Type | Description |
|---|---|---|
model |
string | Agent or deployment slug |
messages |
array | OpenAI-format message list |
stream |
boolean | Enable SSE streaming |
temperature |
number | Creativity (0–2) |
max_tokens |
integer | Max output length |
top_p |
number | Nucleus sampling |
stop |
string/array | Stop sequences |
All additional parameters are forwarded to the underlying deployment/provider.
Error codes
| Code | Meaning |
|---|---|
401 |
Missing or invalid API key |
403 |
No workspace permission |
404 |
Agent/deployment not found |
400 |
Invalid request / missing provider key |
503 |
Deployment not active |