Authentication
All API requests require authentication via an API key passed as a Bearer token.
sh
curl https://api.mindforge.ai/characters \
-H "Authorization: Bearer YOUR_API_KEY"API keys
API keys use the sk-mf- prefix and are created in the dashboard. Each key is scoped to a single project.
TIP
Mindforge API keys are project-scoped — a key for Project A won't work for Project B. This prevents accidental data mixing between projects.
Base URL
All endpoints are served from:
https://api.mindforge.aiOpenAI-compatible endpoints use the /v1 prefix:
https://api.mindforge.ai/v1/chat/completions
https://api.mindforge.ai/v1/modelsError responses
All errors follow a consistent format:
json
{
"code": 404,
"message": "Character character_abc123 not found"
}OpenAI-compatible endpoints return errors in OpenAI's format:
json
{
"error": {
"message": "Model 'nonexistent' not found.",
"type": "invalid_request_error",
"code": "model_not_found"
}
}Status codes
| Code | Meaning |
|---|---|
200 | Success |
202 | Accepted (async processing started) |
400 | Bad request — check your parameters |
401 | Unauthorized — invalid or missing API key |
404 | Resource not found |
500 | Server error |