API documentation
All models with one key. The API is compatible with OpenAI and Anthropic.
All models with one key. The API is compatible with OpenAI and Anthropic: replace base_url and the key, and leave the rest of your code as it is.
First request
- Create a key
Open "API keys" in the console and click "Create key". The secret is shown once.
- Save it in a variable
Put the key in
MORPHOGEN_API_KEY, not in your code. - Send a request
Money is charged from the organization balance by actual usage, in rubles.
Base URLs:
| SDK | base_url |
|---|---|
| OpenAI | https://api.morphogen.ru/v1 |
| Anthropic | https://api.morphogen.ru |
export MORPHOGEN_API_KEY=mg-...
curl https://api.morphogen.ru/v1/chat/completions \
-H "Authorization: Bearer $MORPHOGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"max_tokens": 300,
"messages": [{"role": "user", "content": "Привет"}]
}'The response comes in the OpenAI format:
{
"model": "claude-sonnet-5",
"choices": [{
"message": { "role": "assistant", "content": "Здравствуйте. Чем помочь?" }
}],
"usage": { "prompt_tokens": 9, "completion_tokens": 7 }
}Take model names from GET /v1/models with your key: the list depends on what the key can access.
Connect through an agent
Copy the prompt and paste it into Claude Code, Codex or Cursor. The agent reads the documentation and sets up the SDK itself.
Connect this project to Morphogen. Read https://docs.morphogen.ru/llms.txt and the page for our SDK or tool. The key is in the environment variable MORPHOGEN_API_KEY, do not write it to files. Take a model from GET /v1/models and make one test request. If the request fails, find the error code at https://docs.morphogen.ru/en/reference/errors and say what to fix.
Documentation as MCP
The agent searches the documentation on its own, with no key and no sign-in:
claude mcp add --transport http morphogen-docs https://docs.morphogen.ru/mcpDetails and setup for other clients: Documentation as MCP.
Sections
- Quickstart: the first request in cURL, Python and TypeScript.
- Keys and access: how to create a key and limit models and spending.
- Claude Code, Codex, Cursor: two environment variables and a one-command check.
- API reference: endpoints, parameters and responses.
- Models: what the catalog has and how to choose.
- Errors: every code, its cause and what to do.