> ## Documentation Index
> Fetch the complete documentation index at: https://openrouter-d02e98a0-mintlify-7021d5f4.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# TaskBudget - Python SDK

> TaskBudget method reference

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

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.

## Fields

| Field       | Type                                                                             | Required             | Description |
| ----------- | -------------------------------------------------------------------------------- | -------------------- | ----------- |
| `remaining` | *OptionalNullable\[int]*                                                         | :heavy\_minus\_sign: | N/A         |
| `total`     | *int*                                                                            | :heavy\_check\_mark: | N/A         |
| `type`      | [components.TypeTokens](/client-sdks/python/api-reference/components/typetokens) | :heavy\_check\_mark: | N/A         |
