> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mka1.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Responses

> Combine inputs, retrieval, tools, and outputs in one model interaction.

Responses is the core MKA1 API for building model interactions. Send input to a model, give it access to the tools or knowledge it needs, and receive a response. The same API supports text, image, document, and audio inputs, with output capabilities determined by the selected model.

Start with [Text generation](/docs/generate-a-response) for a complete request, or follow the [Quickstart](/docs/quickstart) if you have not configured a client yet.

## Build a response

1. **Provide input.** Send text, or include [images](/docs/image-inputs), [documents](/docs/document-inputs), or [audio](/docs/audio-inputs).
2. **Add context and tools.** Retrieve context from [vector stores](/docs/vector-stores) or [graph stores](/docs/graph-retrieval). Use [function calling](/docs/function-calling), [MCP tools](/docs/mcp-tools), or [code execution](/docs/code-execution) when the model needs to act.
3. **Choose the output.** Receive text, enable [image generation](/docs/image-generation), or request [audio output](/docs/audio-responses). Check the feature guide for its model requirements and request fields.
4. **Manage the interaction.** [Stream output](/docs/streaming), continue a [conversation](/docs/conversations), or run a long request [in the background](/docs/background-responses).

## Inputs, resources, and tools

Start with [Files](/docs/files) to upload content and obtain file IDs for [document inputs](/docs/document-inputs) and [vector stores](/docs/vector-stores).

Inputs belong to a request. Resources such as [files](/docs/files), vector stores, and sandbox sessions have their own creation and management APIs and can be reused across requests.

For retrieval, upload and index your files before searching the store. The retrieval guides show how to obtain context that you can pass to a response. Graph retrieval changes how a vector store finds connected evidence.

Tools let the model request actions as part of generating a response. Function calling lets your application execute those actions; MCP connects tool servers. Shell handles broader workspace tasks, while code interpreter focuses on writing and running code. Both use the same sandbox platform; see [Code execution](/docs/code-execution).

## Choose a standalone API when appropriate

| Task                     | Through Responses                                                     | Standalone API                                                                |
| ------------------------ | --------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| Generate an image        | [Image generation tool](/docs/image-generation) within an interaction | [Image generation](/docs/images-api) from a direct prompt                     |
| Work with incoming audio | [Audio inputs](/docs/audio-inputs) for a model reply                  | [Speech to text](/docs/speech-to-text) for transcription                      |
| Run code                 | [Code execution tools](/docs/code-execution) chosen by the model      | [Sandbox](/docs/sandbox) sessions and commands controlled by your application |
| Produce speech           | [Audio output](/docs/audio-responses) from a model reply              | [Text to speech](/docs/text-to-speech) from supplied text                     |

[Realtime voice](/docs/advanced-voice-mode) is a standalone API with its own session workflow. Start there when building a live voice interaction. For document-to-JSON extraction with reusable schemas, use the standalone [Extract API](/docs/extract-structured-data).

## Build reusable workflows

[Agents](/docs/agents-overview) build on Responses by saving instructions, model selection, and tool configuration for repeated runs. [Structured extraction](/docs/extract-structured-data) provides a dedicated workflow for turning documents and images into JSON using an inline or saved schema.

Use [prompt templates](/docs/prompt-repository) to reuse prompts, [history and memory](/docs/long-term-memory) to retain context, and [evals](/docs/evals) to measure behavior.
