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

# API Config • AI Agent SDK

> ApiConfig: Configuration for additive protocol surfaces on the gateway app.

# ApiConfig

> Defined in the [**config**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/config.md) module.

AI Agent

Configuration for additive protocol surfaces on the gateway app.

All surfaces are opt-in. When both are False (default), no extra routes
are mounted and the gateway behaves exactly as before.

Attributes:
openai: Serve OpenAI-compatible endpoints
(`/v1/chat/completions`, `/v1/responses`, `/v1/models`)
backed by the gateway's live agents and sessions.
mcp: Serve an MCP JSON-RPC endpoint (`/mcp`) exposing the gateway's
registered agents as callable tools.
stream: Emit true token-level deltas on the OpenAI-compatible
`/v1/chat/completions` SSE surface (`stream:true`) by wiring the
agent's existing `stream_emitter` through the gateway hot path.
Off by default: streaming responses stay byte-for-byte the buffered
single-chunk path, so enabling it never regresses non-streaming
latency or correctness.

## Properties

**openai** `bool`

No description available.

**mcp** `bool`

No description available.

**stream** `bool`

No description available.

## Methods

> [card] [enabled()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/ApiConfig-enabled.md)
>
> Whether any additional protocol surface is enabled.

> [accordion] Internal & Generic Methods
>
> * **from\_dict**: Create from a parsed `gateway.api` mapping (tolerant of None).
> * **to\_dict**: Convert to dictionary.

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/gateway/config.py#L860)
>
> `praisonaiagents/gateway/config.py` at line 860

***

## Related Documentation

> [card] [Configuration Overview](https://praison.ai/docs/docs/configuration/index)

> [card] [Agent Config](https://praison.ai/docs/docs/configuration/agent-config)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.