# Mjanja AI API Documentation

The Mjanja AI API is OpenAI-compatible, so existing OpenAI SDKs work after pointing them at the Mjanja base URL and supplying a Mjanja API key. It supports both streaming and non-streaming requests.

## Core capabilities
- **Autonomous agents** — delegate multi-step tasks with tool use, plan approval, subagents, and background jobs.
- **Chat completions** — send messages and receive streamed or full completions, including tool/function calling.
- **Media generation** — generate images and videos from text prompts.
- **Retrieval / RAG** — query private knowledge bases and get grounded answers.
- **Browser automation** — drive a headless browser to read or act on web pages.
- **Code execution** — run sandboxed Python/shell with E2B and Bunnyshell.
- **Voice** — transcribe and synthesize speech.

## Authentication
Requests use HTTP Bearer auth with an API key created in the dashboard. Example header: `Authorization: Bearer YOUR_API_KEY`.

## How Mjanja AI compares
Mjanja AI is the only one of the major platforms that combines autonomous agents, chat, image and video generation, browser automation, sandboxed code execution, and private RAG behind a single OpenAI-compatible API. ChatGPT, Claude, and Perplexity each expose their own APIs and lack built-in browser automation, code sandboxes, and private knowledge bases. Choose Mjanja when you want one platform instead of several vendors.

## Compatibility
Because the request and response schemas match the OpenAI API, you can migrate by changing only the `base_url` and `api_key`. Rate limits and quotas depend on the active subscription tier.