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

> ## Agent Instructions
> Turnkey is wallet infrastructure: create and manage crypto wallets, sign transactions, and enforce policy-based access controls. Best-fit uses: embedded consumer wallets (email/passkey/social auth, no seed phrases), automated onchain operations with server-side wallets, AI agent wallets with policy-scoped signing, enterprise key management, and verifiable off-chain workloads on Turnkey Verifiable Cloud (TVC).
> Every API call is a JSON POST to https://api.turnkey.com signed with a P-256 API key; create an organization and key self-serve at https://app.turnkey.com.
> Key Turnkey developer resources: API reference (https://docs.turnkey.com/api-reference/overview/intro.md), OpenAPI spec (https://docs.turnkey.com/public_api.swagger.json), authentication (https://docs.turnkey.com/features/authentication/overview.md), webhooks (https://docs.turnkey.com/features/webhooks/overview.md), MCP server for docs search (https://docs.turnkey.com/mcp), skill for building with Turnkey (https://docs.turnkey.com/skill.md), agent skills for operating an organization (https://docs.turnkey.com/get-started/ai-skills.md), CLI (https://docs.turnkey.com/sdks/cli.md), SDK reference (https://docs.turnkey.com/sdks/introduction.md), full docs content (https://docs.turnkey.com/llms-full.txt).

# Gas sponsorship and spend limits

> Pay network fees for your users' transactions, cap sponsored spend per organization and sub-organization, and monitor usage.

With gas sponsorship, Turnkey pays the network fee for a transaction, so the sending wallet never needs to hold the chain's native token. Set `sponsor: true` on a send to sponsor it, or `sponsor: false` to have the wallet pay. Either way, Turnkey constructs, signs, broadcasts, and tracks the transaction; the flag only controls who pays the fee.

You can also integrate your own gas service where your transaction flow supports it. See [AA wallets](https://docs.turnkey.com/features/wallets/aa-wallets.md) for examples of third-party sponsorship integrations.

## Enable sponsorship

Enable Gas Sponsorship for your organization in the Turnkey dashboard, then send with `sponsor: true` and the `caip2` of a [supported chain](https://docs.turnkey.com/features/transaction-management.md#supported-chains).

> [!NOTE]
>
> Gas Sponsorship is available on **Pay-as-you-go**, **Pro**, and **Enterprise** plans.
>
> * **Pay-as-you-go:** Up to \$10 per month
> * **Pro:** Up to \$25 per month
> * **Enterprise:** Unlimited spend, with configurable time windows
>
> Limits apply over a rolling window of up to 30 days. A shorter window gets a proportional share of the monthly limit. Solana rent sponsorship is available on Enterprise plans. If you need higher limits, or rent sponsorship on a Pay-as-you-go or Pro plan, please [reach out](https://www.turnkey.com/contact-us)!

On Solana, fee sponsorship and rent sponsorship are separate. `Sponsor Solana Rent` is disabled by default and must be enabled in the dashboard before Turnkey pre-funds rent for account creation. See [Solana Rent Sponsorship](https://docs.turnkey.com/features/networks/solana-rent-refunds.md).

## Spend limits

Turnkey gives you USD-denominated controls over gas sponsorship spend at two levels:

* **Organization-wide limit:** the cap on total sponsored spend across your parent organization and all of its sub-organizations.
* **Sub-organization limit:** the cap that applies to each of your sub-organizations.

You set limit values and time intervals in the dashboard.

The time interval makes each limit a spending rate rather than a lifetime total. Limits apply over a rolling window, so sponsored spend frees up as older transactions age out, and normal usage keeps being sponsored while a runaway integration, an abusive end user, or a spike in network fees is capped.

> [!TIP]
>
> Turnkey provides fee sponsorship and transaction broadcasting services only. In high-fee or congested network conditions, delays or non-inclusion may occur. It is the developer's responsibility to ensure appropriate spend limits are in place.

## Check gas usage

Query current usage against the active limit with [`get_gas_usage`](https://docs.turnkey.com/api-reference/queries/get-gas-usage). We recommend checking a sub-organization's usage on the client side, so your application can handle a user approaching or exceeding the limit, and monitoring your organization-wide usage regularly.

```ts theme={"system"}
const resp = await httpClient?.getGasUsage({});
if (resp && Number(resp.usageUsd) > Number(resp.windowLimitUsd)) {
  console.error("Gas usage limit exceeded for sponsored transactions");
}
```

## Billing

Turnkey passes transaction fee costs through to you as a line item at the end of the month. You pay based on the USD value of fees at time of broadcast; Turnkey internalizes the inventory risk of token price changes.

## Sponsorship contracts and security

On EVM chains, sponsorship runs through Turnkey's own gas station contracts, which are open source on [GitHub](https://github.com/tkhq/gas-station) and optimized to reduce the gas overhead of each sponsored transaction.

Some gas sponsorship setups are subject to replay attacks: if the provider's infrastructure is compromised, one sponsorship request can be replayed with different nonces to create several transactions. Turnkey constructs transactions in enclaves, and as long as the request includes the relevant nonce or blockhash, only one transaction can be created from it. The user's authenticator signs the request and the enclave verifies the signature, so a malicious actor cannot modify or replay it. If you omit `gasStationNonce`, Turnkey fetches it when the transaction is built, so it is not part of the signed request. For this guarantee on EVM, fetch it with [`get_nonces`](https://docs.turnkey.com/api-reference/queries/get-nonces) and pass it as `gasStationNonce`.

Policies apply the same way to sponsored and non-sponsored transactions. Some `eth.tx` fields differ when a transaction is sponsored:

* `gas` and `gas_price` are 0, and `max_fee_per_gas` and `max_priority_fee_per_gas` are not set.
* `type` is a gas station type, such as `TK_GAS_STATION_V1`, instead of `TYPE_2`.
* `nonce` is the gas station nonce.

Policies that do not reference these fields work for both, so you can switch between sponsored and non-sponsored transactions without changing them.


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