# MKA1 - [API Reference (544 pages)](https://docs.mka1.com/_llms/en/api-reference.txt): Documentation for API Reference. ## Home - [MKA1](https://docs.mka1.com/index.md): Find what you can build with MKA1, explore the services behind it, and meet MK Code. ## Developers ### Get started - [Overview](https://docs.mka1.com/docs/platform-getting-started.md): Build with MKA1 or explore the platform behind your deployment. - [Quickstart](https://docs.mka1.com/docs/quickstart.md): Make your first MKA1 API request with an API key and SDK. - [API keys](https://docs.mka1.com/docs/authentication.md): Create an API key and authenticate server-side MKA1 requests. - [Models](https://docs.mka1.com/docs/models.md): Discover the models your API key can use and choose one for a request. ### SDKs and CLI - [SDKs](https://docs.mka1.com/docs/sdks.md): Install a supported client and connect it to your MKA1 deployment. - [OpenAI compatibility](https://docs.mka1.com/docs/openai-compatibility.md): Use the OpenAI TypeScript SDK with supported MKA1 endpoints. #### CLI - [Installation](https://docs.mka1.com/docs/cli/introduction.md): Install the mka1 CLI, enable shell completion, and run your first MKA1 API command from the terminal. - [Authentication](https://docs.mka1.com/docs/cli/authentication.md): Configure the mka1 CLI with your API key using flags, environment variables, the OS keychain, or a config file — and attach X-On-Behalf-Of for multi-user integrations. - [Commands](https://docs.mka1.com/docs/cli/commands.md): Tour the mka1 CLI command tree with worked examples for Responses, Conversations, Files, Vector Stores, Extract, Speech, Agents, and more. - [Request bodies](https://docs.mka1.com/docs/cli/request-body.md): Build mka1 CLI requests with individual flags, the --body JSON shortcut, or stdin piping — and understand how the three inputs combine. - [Output and filtering](https://docs.mka1.com/docs/cli/output-formats.md): Switch the mka1 CLI between pretty, JSON, YAML, table, and TOON output. Transform results with jq, stream SSE events, and control color. - [Debugging](https://docs.mka1.com/docs/cli/diagnostics.md): Preview mka1 CLI requests with --dry-run, trace them live with --debug, explore the command tree interactively, and enable agent mode for AI coding tools. ### Responses - [Responses](https://docs.mka1.com/docs/responses.md): Combine inputs, retrieval, tools, and outputs in one model interaction. - [Text generation](https://docs.mka1.com/docs/generate-a-response.md): Use the MKA1 API Responses resource to generate text, send structured messages, and continue multi-turn exchanges. - [Streaming](https://docs.mka1.com/docs/streaming.md): Receive generated text incrementally from the Responses API. - [Conversations](https://docs.mka1.com/docs/conversations.md): Store conversation state in the MKA1 API, add message items, and continue a response flow without resending the full history. - [Background responses](https://docs.mka1.com/docs/background-responses.md): Run long-running responses in the background and retrieve results by polling or streaming. - [History and memory](https://docs.mka1.com/docs/long-term-memory.md): Use the history tool to give models persistent memory across sessions, enabling recall of past conversations per end-user. - [Prompt templates](https://docs.mka1.com/docs/prompt-repository.md): Manage versioned prompt templates with change history, rollback, and variable rendering through the Prompts API. #### Inputs - [Image inputs](https://docs.mka1.com/docs/image-inputs.md): Send image inputs to the Responses API. - [Document inputs](https://docs.mka1.com/docs/document-inputs.md): Send document inputs to the Responses API. - [Audio inputs](https://docs.mka1.com/docs/audio-inputs.md): Send audio inputs to the Responses API. #### Outputs - [Image generation](https://docs.mka1.com/docs/image-generation.md): Generate images through the Responses API. - [Audio responses](https://docs.mka1.com/docs/audio-responses.md): Generate spoken output alongside a Responses API reply. #### Retrieval - [Vector stores](https://docs.mka1.com/docs/vector-stores.md): Index files and retrieve relevant document chunks. - [Graph retrieval](https://docs.mka1.com/docs/graph-retrieval.md): Use graph-aware vector stores for questions that connect facts across documents. #### Tools - [Function calling](https://docs.mka1.com/docs/function-calling.md): Let a model request an application function and return its result to the conversation. - [Use MCP tools](https://docs.mka1.com/docs/mcp-tools.md): Connect an MCP server to the MKA1 API Responses resource, limit allowed tools, and optionally require end-user approval. - [Code execution](https://docs.mka1.com/docs/code-execution.md): Let Responses run shell commands or code in a sandbox, and reuse sessions and files. - [Web search](https://docs.mka1.com/docs/web-search.md): Let a model search the web and read pages, and see which provider handles those requests and what data it receives. #### Examples - [Conversation continuity](https://docs.mka1.com/docs/advanced-conversations.md): A complete 12-turn dialogue with web search, corrections, contradictions, and coherence verification — showing every request and full response. - [Reference applications](https://docs.mka1.com/docs/reference-applications.md): Run two complete Python applications built on the MKA1 API: ticket triage and CSV analyst. ### Standalone APIs - [Files](https://docs.mka1.com/docs/files.md): Upload and list files for use across MKA1 APIs. - [Image generation](https://docs.mka1.com/docs/images-api.md): Generate an image directly from a prompt using the standalone Images API. - [Speech to text](https://docs.mka1.com/docs/speech-to-text.md): Transcribe recordings and identify speakers. - [Text to speech](https://docs.mka1.com/docs/text-to-speech.md): Synthesize speech or stream audio as it is generated. - [Realtime voice](https://docs.mka1.com/docs/advanced-voice-mode.md): Build real-time voice sessions with the MKA1 API using LiveKit. Configure LLM options, tools, STT tuning, and conversation continuity. - [Sandbox sessions](https://docs.mka1.com/docs/sandbox.md): Create a sandbox session, run commands and code in its workspace, move files in and out, hand it to a response, and terminate it when you are done. - [Structured data](https://docs.mka1.com/docs/extract-structured-data.md): Define a reusable extraction schema in the MKA1 API and extract structured fields from files. ### Agents - [Agents](https://docs.mka1.com/docs/agents-overview.md): Build reusable workflows on top of Responses. - [Create and run agents](https://docs.mka1.com/docs/managing-agents.md): Create reusable agent definitions, execute them later, and inspect persisted run history. - [Memory stores](https://docs.mka1.com/docs/build-an-agent-with-memory-stores.md): Mount durable memory into a saved agent's managed shell environment and keep it current between runs. - [Chat connectors](https://docs.mka1.com/docs/agent-connectors.md): Connect a saved agent to Telegram or WhatsApp. - [Schedules](https://docs.mka1.com/docs/agent-schedules.md): Run a saved agent once, at intervals, or on a cron schedule. - [Subagents](https://docs.mka1.com/docs/spawn-subagents-using-the-responses-api.md): Use a function tool on the MKA1 API Responses resource to let one response spawn child responses and continue after they all return. #### Examples - [Build an agent with MCP tools](https://docs.mka1.com/docs/build-an-agent-with-mcp-tools.md): Create a saved agent that calls a vault-managed MCP server with encrypted per-end-user credentials. - [Hand a conversation over to a human agent](https://docs.mka1.com/docs/hand-over-to-a-human-agent.md): Decide when a conversation needs a person, pick the queue from routing rules you control, and send the full history along with it. - [Deep research](https://docs.mka1.com/docs/making-deep-research-with-subagents.md): Build a deep research workflow on the MKA1 API by using a parent response to delegate parallel web research to child responses and synthesize compact research memos. - [Multichannel conversations](https://docs.mka1.com/docs/multichannel-conversational.md): Demonstrate WhatsApp and web channels sharing one stored MKA1 API conversation with unified JSONL audit logs. ### Evals - [Run an eval](https://docs.mka1.com/docs/evals.md): Create reusable eval suites, run them against MKA1-routed models, and inspect per-sample results, metrics, and artifacts. - [Schedule eval runs](https://docs.mka1.com/docs/eval-schedules.md): Run an eval suite on a cron or interval cadence, trigger it on demand, and get notified when runs finish or fail. - [Task suites](https://docs.mka1.com/docs/evals-task-suites.md): Define eval manifests with uploaded files, Hugging Face datasets, prompt templates, few-shot examples, output extraction, metrics, and generation knobs. - [Python graders](https://docs.mka1.com/docs/evals-python-graders.md): Use sample, batch, and model-backed Python graders to score MKA1 eval runs, including LLM judges and embedding-based scoring. - [Results and artifacts](https://docs.mka1.com/docs/eval-results.md): Inspect eval samples, scores, and downloadable artifacts. ### Compute - [Overview](https://docs.mka1.com/docs/compute.md): Early access - [Repositories](https://docs.mka1.com/docs/repositories.md): Early access - [Datasets](https://docs.mka1.com/docs/datasets.md): Early access - [Tracking](https://docs.mka1.com/docs/tracking.md): Early access - [Run a fine-tune job](https://docs.mka1.com/docs/compute-fine-tune-job.md): Early access - [Reinforcement learning](https://docs.mka1.com/docs/compute-reinforcement-learning.md): Early access - [Deploy a model server](https://docs.mka1.com/docs/compute-deployment.md): Early access - [Manage resources](https://docs.mka1.com/docs/compute-resources.md): Early access ### Authentication - [End-user identity](https://docs.mka1.com/docs/end-user-identity.md): Attribute server-side requests to your application’s end users. - [Short-lived tokens](https://docs.mka1.com/docs/short-lived-tokens.md): Exchange an API key for a scoped, time-limited token. ### Production - [Rate limits](https://docs.mka1.com/docs/rate-limiting.md): Per-key rate limits with configurable quotas per minute, hour, or day. Includes real HTTP 429 demonstration and retry patterns. - [Batch processing](https://docs.mka1.com/docs/batch-processing.md): Send large volumes of requests asynchronously using the Batch API. Process Responses, chat completions, embeddings, and image generations in bulk within a 24-hour completion window. - [Guardrails](https://docs.mka1.com/docs/guardrails.md): Set content policies, test your rules, and handle blocked requests in your application. - [Errors and retries](https://docs.mka1.com/docs/errors-and-retries.md): Diagnose failed requests and decide when an operation can be retried. ## Applications ### MK Code #### Get started - [MK Code](https://docs.mka1.com/docs/mka1-code.md): Plan, build, and review software with an AI agent in a desktop workspace powered by the MKA1 API. - [Install](https://docs.mka1.com/docs/mka1-code/install.md): Install the desktop app, connect your organization account, and check the gateway and available models. - [Models and providers](https://docs.mka1.com/docs/mka1-code/models.md): Choose a gateway model, configure a default, and add a compatible provider for local coding. - [Quickstart](https://docs.mka1.com/docs/mka1-code/first-task.md): Read a project, reproduce a checkout bug, verify the fix, and prepare to review the changed files. #### Features - [Sessions and project context](https://docs.mka1.com/docs/mka1-code/sessions.md): Add files, guide a running task, find earlier work, and understand context usage in the desktop app. - [Planning and permissions](https://docs.mka1.com/docs/mka1-code/permissions.md): Plan an approach before editing and choose how the agent requests approval for tools. - [Specialized agents](https://docs.mka1.com/docs/mka1-code/agents.md): Use a focused agent for investigation or review, and define reusable roles with their own tools and instructions. - [Browser automation](https://docs.mka1.com/docs/mka1-code/previews.md): Test a running web app, follow browser actions, and take control when a workflow needs your input. - [Review and commit changes](https://docs.mka1.com/docs/mka1-code/review-changes.md): Inspect diffs and test results, choose what to commit, and push or open a pull request. - [Parallel work and worktrees](https://docs.mka1.com/docs/mka1-code/workspaces.md): Separate simultaneous coding tasks with branches, worktrees, and desktop panels. - [Remote development](https://docs.mka1.com/docs/mka1-code/remote-development.md): Run coding sessions on SSH hosts, WSL distributions, or Docker containers. - [Scheduled tasks](https://docs.mka1.com/docs/mka1-code/schedules.md): Run recurring project checks and resume a local coding conversation later. #### Tools and customization - [Project memory](https://docs.mka1.com/docs/mka1-code/memory.md): Save and approve project preferences for future local coding sessions. - [Connectors, skills, and plugins](https://docs.mka1.com/docs/mka1-code/extensions.md): Connect external tools and manage reusable instructions for coding tasks. - [Documents and files](https://docs.mka1.com/docs/mka1-code/documents.md): Attach source material and review generated PDFs, spreadsheets, presentations, and documents in local sessions. #### Other interfaces - [VS Code extension](https://docs.mka1.com/docs/mka1-code/vscode.md): Install MK Code in VS Code and work with the agent alongside your source files. - [CLI](https://docs.mka1.com/docs/mka1-code/cli.md): Install the MK Code CLI, run interactive sessions, and use coding tasks in scripts. #### Support - [Keyboard shortcuts](https://docs.mka1.com/docs/mka1-code/keyboard-shortcuts.md): Navigate the desktop app, work with sessions and panes, and customize keyboard shortcuts. - [Usage and troubleshooting](https://docs.mka1.com/docs/mka1-code/troubleshooting.md): Inspect gateway usage and resolve sign-in, project, connector, remote, schedule, and Git problems. ## Platform ### Overview - [Platform overview](https://docs.mka1.com/docs/platform-overview.md): Understand what MKA1 deploys and how to evaluate and administer the platform. - [Architecture](https://docs.mka1.com/docs/architecture/overview.md): Explore how MKA1's capabilities, services, and supporting infrastructure fit together. - [Requirements](https://docs.mka1.com/docs/architecture/requirements.md): Node, compute, storage, and platform requirements to run MKA1 — from a minimum viable footprint to a highly available deployment. ### Setup - [Organization setup](https://docs.mka1.com/docs/organization-setup.md): Accept an invite and set up an organization in an existing MKA1 cluster. - [Console tour](https://docs.mka1.com/docs/console-tour.md): Find models, applications, and administration tools in the MKA1 console. - [Teams and members](https://docs.mka1.com/docs/teams-and-members.md): Invite people and organize access within an organization. - [Service accounts](https://docs.mka1.com/docs/service-accounts.md): Use non-human identities for production applications and automation. ### Model management - [Model registry](https://docs.mka1.com/docs/model-registry.md): Activate models, manage catalog access, and configure organization model defaults. - [Auto routing](https://docs.mka1.com/docs/auto-routing.md): Understand and validate how MKA1 selects a model when a request uses model auto. ### Operations - [Budgets](https://docs.mka1.com/docs/budgets.md): Cap spend per organization, member, team, API key, or end user with daily, weekly, or monthly limits, threshold alerts, and 403 enforcement. - [Usage and auditing](https://docs.mka1.com/docs/usage-auditing.md): Track per-user usage, correlate requests at the API edge, and structure per-unit audit events for misuse detection. - [Service levels](https://docs.mka1.com/docs/service-levels.md): The availability and latency objectives for MKA1 API services, and the monthly report your organization gets against them. ### Access control - [Resource permissions](https://docs.mka1.com/docs/authorization.md): Control access to LLM resources with role-based authorization. Assign owner, writer, or reader roles to users and verify permissions before every action. - [Tenant isolation](https://docs.mka1.com/docs/authentication-deep-dive.md): Demonstrate segregated tenants in the MKA1 API with separate API keys, separate quotas, separate policies, and tenant-scoped resource access. ### Security and compliance - [Data encryption](https://docs.mka1.com/docs/data-encryption.md): See which encryption controls are active in the deployed MKA1 environment, how we validate them, and the evidence captured from production. - [HSM-backed keys and TLS 1.3](https://docs.mka1.com/docs/hsm-tls-validation.md): How MKA1 uses AWS KMS hardware security modules and enforces TLS 1.3 for cryptographic key management across data at rest and in transit. - [Signed artifacts and supply chain](https://docs.mka1.com/docs/signed-artifacts.md): How MKA1 ensures container image integrity through immutable artifact tagging, controlled CI/CD pipelines, and private registry enforcement. - [GitOps and rollback](https://docs.mka1.com/docs/gitops-atomic-rollback.md): How MKA1 uses Git as the single source of truth and Helm atomic deploys to guarantee automatic rollback on failure. - [Authorship and provenance](https://docs.mka1.com/docs/authorship-procedure.md): The procedure for updating authorship with each new version. ### Benchmarks - [Streaming latency](https://docs.mka1.com/docs/streaming-output-latency.md): Client-observed benchmark of first streamed text token latency for the MKA1 Responses API. - [Retrieval quality](https://docs.mka1.com/docs/evaluating-text-stores.md): Benchmark results for the MKA1 retrieval engine on the BEIR SciFact dataset: accuracy, latency, and indexing throughput. - [GraphRAG](https://docs.mka1.com/docs/graphrag.md): A benchmark comparison of GraphRAG and traditional RAG on multi-hop retrieval questions. - [Localization and ambiguity](https://docs.mka1.com/docs/localization-and-ambiguity.md): Run neutral evaluations that prove spontaneous regional localization and clarification behavior with the MKA1 SDK. - [Portuguese embeddings](https://docs.mka1.com/docs/pt-br-embeddings.md): Technical report on mk-embeddings-pt — a Brazilian Portuguese embedding model with MTEB benchmark results, semantic quality metrics, and comparison to multilingual baselines. ## OpenAPI Specs - [speakeasy](https://apigw.mka1.com/speakeasy.json) - [speakeasy](https://apigw.mka1.com/speakeasy.json?language=pt-BR) - [speakeasy](https://apigw.mka1.com/speakeasy.json?language=es) > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [English / API Reference (544 pages)](https://docs.mka1.com/_llms/en/api-reference.txt): Documentation for English / API Reference. - [English / API Reference / Tools and sandbox (64 pages)](https://docs.mka1.com/_llms/en/api-reference/tools-and-sandbox.txt): Documentation for English / API Reference / Tools and sandbox. - [English / API Reference / Evals and feedback (55 pages)](https://docs.mka1.com/_llms/en/api-reference/evals-and-feedback.txt): Documentation for English / API Reference / Evals and feedback. - [English / API Reference / Usage and budgets (46 pages)](https://docs.mka1.com/_llms/en/api-reference/usage-and-budgets.txt): Documentation for English / API Reference / Usage and budgets. - [Spanish (609 pages)](https://docs.mka1.com/_llms/es.txt): Documentation for Spanish. - [Spanish / Referencia API (542 pages)](https://docs.mka1.com/_llms/es/referencia-api.txt): Documentation for Spanish / Referencia API. - [Spanish / Referencia API / Tools and sandbox (64 pages)](https://docs.mka1.com/_llms/es/referencia-api/tools-and-sandbox.txt): Documentation for Spanish / Referencia API / Tools and sandbox. - [Spanish / Referencia API / Evals and feedback (55 pages)](https://docs.mka1.com/_llms/es/referencia-api/evals-and-feedback.txt): Documentation for Spanish / Referencia API / Evals and feedback. - [Spanish / Referencia API / Organizations and access (65 pages)](https://docs.mka1.com/_llms/es/referencia-api/organizations-and-access.txt): Documentation for Spanish / Referencia API / Organizations and access. - [Brazilian Portuguese (614 pages)](https://docs.mka1.com/_llms/pt-br.txt): Documentation for Brazilian Portuguese. - [Brazilian Portuguese / Referência da API (542 pages)](https://docs.mka1.com/_llms/pt-br/referencia-da-api.txt): Documentation for Brazilian Portuguese / Referência da API. - [Brazilian Portuguese / Referência da API / Tools and sandbox (63 pages)](https://docs.mka1.com/_llms/pt-br/referencia-da-api/tools-and-sandbox.txt): Documentation for Brazilian Portuguese / Referência da API / Tools and sandbox. - [Brazilian Portuguese / Referência da API / Evals and feedback (55 pages)](https://docs.mka1.com/_llms/pt-br/referencia-da-api/evals-and-feedback.txt): Documentation for Brazilian Portuguese / Referência da API / Evals and feedback. - [Brazilian Portuguese / Referência da API / Organizations and access (65 pages)](https://docs.mka1.com/_llms/pt-br/referencia-da-api/organizations-and-access.txt): Documentation for Brazilian Portuguese / Referência da API / Organizations and access. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.