# MKA1 - [API Reference (391 pages)](https://docs.mka1.com/_llms/en/api-reference.md): Documentation for API Reference. ## Docs ### Getting started - [Getting Started](https://docs.mka1.com/docs/platform-getting-started.md): From a cluster invite link to building applications with the MKA1 SDK. Accept your invite, set up your organization, mint an API key, and make your first request. - [Authentication](https://docs.mka1.com/docs/authentication.md): Authenticate to the MKA1 API with your API key, decide when to send X-On-Behalf-Of, and exchange an API key for a short-lived JWT. - [Authentication and 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. - [Authorization](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. ### Responses - [Generate a response](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. - [Background responses](https://docs.mka1.com/docs/background-responses.md): Run long-running responses in the background and retrieve results by polling or streaming. - [Manage 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. - [Multimodal input](https://docs.mka1.com/docs/multimodal-input.md): Send images, audio, documents, and mixed content to the MKA1 API for vision, transcription, OCR, and multimodal reasoning. - [Multimodal output](https://docs.mka1.com/docs/multimodal-output.md): Generate audio speech and images from the MKA1 API using the Responses resource. - [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. - [Long-term 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. ### Features - [Manage models](https://docs.mka1.com/docs/models.md): See which models your organization can call, activate catalog entries in its registry, and choose what `model: "auto"` resolves to. - [Use files and vector stores](https://docs.mka1.com/docs/files-and-vector-stores.md): Upload files to the MKA1 API, index them in a vector store, and run semantic search over the resulting document chunks. - [Batch processing](https://docs.mka1.com/docs/batch-processing.md): Send large volumes of requests asynchronously using the Batch API. Process chat completions, embeddings, and image generations in bulk with a 24-hour completion window. - [Run code in a sandbox](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. - [Fine-tune a model](https://docs.mka1.com/docs/fine-tuning.md): Upload fine-tuning data, create a fine-tuning job, monitor training progress, and use the resulting model with the `@meetkai/mka1` SDK. - [Run evals](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. - [Design eval 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. - [Write Python eval 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. - [Extract 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. - [Prompt repository](https://docs.mka1.com/docs/prompt-repository.md): Manage versioned prompt templates with change history, rollback, and variable rendering through the Prompts API. - [Manage agents](https://docs.mka1.com/docs/managing-agents.md): Create reusable agent definitions, execute them later, and inspect persisted run history. - [Connect agents to chat apps and schedules](https://docs.mka1.com/docs/agent-connectors-and-schedules.md): Bind a saved agent to a Telegram bot or WhatsApp number so chat messages become runs, and start runs on a one-time, interval, or cron schedule. - [Guardrails](https://docs.mka1.com/docs/guardrails.md): Set content policies, test your rules, and handle blocked requests in your application. - [Speech](https://docs.mka1.com/docs/speech.md): Transcribe audio and generate speech with the MKA1 API. Use speaker-labeled segments when you need multi-speaker separation. - [Advanced Voice Mode](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. ### Compute - [Manage repositories](https://docs.mka1.com/docs/repositories.md): Create and manage mka1-repos repositories — org-scoped git repositories for the model weights and datasets that Compute workloads pull from and publish to. - [Run a fine-tune job](https://docs.mka1.com/docs/compute-fine-tune-job.md): Fine-tune a model on rented GPUs with a Compute job, monitor training from logs and SSH, and publish the merged weights to mka1-repos. - [Deploy a model server](https://docs.mka1.com/docs/compute-deployment.md): Serve a model behind an authenticated HTTP endpoint with a Compute service, pull weights from mka1-repos, and register the endpoint with the LLM gateway. ### CLI - [CLI overview](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. - [Authenticate the CLI](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. - [Pass 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. - [Format and filter output](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. - [Debug and inspect](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. ### Recipes - [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. - [Build an agent with 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. - [Spawn subagents using the Responses API](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. - [Making deep research with subagents](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 conversational](https://docs.mka1.com/docs/multichannel-conversational.md): Demonstrate WhatsApp and web channels sharing one stored MKA1 API conversation with unified JSONL audit logs. - [Advanced conversations with tools](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. ### Benchmarks - [Streaming output latency](https://docs.mka1.com/docs/streaming-output-latency.md): Client-observed benchmark of first streamed text token latency for the MKA1 Responses API. - [Evaluating 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 evaluation](https://docs.mka1.com/docs/graphrag.md): A benchmark comparison of GraphRAG and traditional RAG on multi-hop retrieval questions. - [Evaluate regional localization and ambiguity handling](https://docs.mka1.com/docs/evaluating-local-language-and-ambiguity.md): Run neutral evaluations that prove spontaneous regional localization and clarification behavior with the MKA1 SDK. - [Specialized pt-BR 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. ### Infrastructure - [Architecture overview](https://docs.mka1.com/docs/architecture/overview.md): Explore how every MKA1 capability, service, and attached resource fits together. - [Cluster minimum 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. - [Auto routing](https://docs.mka1.com/docs/auto-routing.md): Understand and validate how MKA1 selects a model when a request uses model auto. - [Usage 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. - [Rate limiting](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. - [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. - [Authorship procedure](https://docs.mka1.com/docs/authorship-procedure.md): The procedure for updating authorship with each new version. - [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 with atomic 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. ## OpenAPI Specs - [speakeasy](https://apigw.mka1.com/speakeasy.json) - [speakeasy](https://apigw.mka1.com/speakeasy.json?language=pt-BR) > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [English / API Reference (391 pages)](https://docs.mka1.com/_llms/en/api-reference.md): Documentation for English / API Reference. - [Spanish (436 pages)](https://docs.mka1.com/_llms/es.md): Documentation for Spanish. - [Spanish / Referencia API (389 pages)](https://docs.mka1.com/_llms/es/referencia-api.md): Documentation for Spanish / Referencia API. - [Brazilian Portuguese (441 pages)](https://docs.mka1.com/_llms/pt-br.md): Documentation for Brazilian Portuguese. - [Brazilian Portuguese / Referência da API (389 pages)](https://docs.mka1.com/_llms/pt-br/referencia-da-api.md): Documentation for Brazilian Portuguese / Referência da API.