> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://openrouter.ai/docs/llms.txt.
> For full documentation content, see https://openrouter.ai/docs/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://openrouter.ai/docs/_mcp/server.

# MessagesOutputConfig - Python SDK

The Python SDK and docs are currently in beta.
Report issues on [GitHub](https://github.com/OpenRouterTeam/python-sdk/issues).

Configuration for controlling output behavior. Supports the effort parameter and structured output format.

## Fields

| Field         | Type                                                                                                     | Required             | Description                                                                                                                                                                                     | Example                              |
| ------------- | -------------------------------------------------------------------------------------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| `effort`      | [OptionalNullable\[components.MessagesOutputConfigEffort\]](../components/messagesoutputconfigeffort.md) | :heavy\_minus\_sign: | How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, `xhigh`, or `max`. | medium                               |
| `format_`     | [OptionalNullable\[components.MessagesOutputConfigFormat\]](../components/messagesoutputconfigformat.md) | :heavy\_minus\_sign: | A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs).                                    |                                      |
| `task_budget` | [OptionalNullable\[components.TaskBudget\]](../components/taskbudget.md)                                 | :heavy\_minus\_sign: | Task budget for an agentic turn. The model sees a countdown of remaining tokens and uses it to prioritize work and wind down gracefully. Advisory — does not enforce a hard cap.                | `{"total": 400000,"type": "tokens"}` |