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

# Integrating with TensorCost

> Pick the way your code, your assistants and your existing traces talk to TensorCost.

TensorCost reads your AI spend from your provider accounts and cloud bills, and sees the calls your own code makes when you wire it in. Which path you take depends on what you want back.

| You want to | Use | Credential |
| - | - | - |
| See every call's cost, model, customer and agent, and keep your provider client as it is | [The SDK](https://docs.tensorcost.com/developers/sdk.md) at the `observe` layer | SDK key and workspace id |
| Refuse calls that break a budget, an approved-model list or a compliance profile | [The SDK](https://docs.tensorcost.com/developers/sdk.md) at `govern`, see [control layers](https://docs.tensorcost.com/developers/control-layers.md) | Same SDK key |
| Let TensorCost route calls to another model | [The SDK](https://docs.tensorcost.com/developers/sdk.md) at `route`, through the proxy | Same SDK key, plus the proxy URL |
| Call the proxy from a language or tool we have no SDK for | [The proxy over HTTP](https://docs.tensorcost.com/developers/proxy.md) | SDK key, exchanged for a 15-minute token |
| Pull spend, budgets and decisions into your own tools | [The REST API](https://docs.tensorcost.com/developers/api.md) | API key |
| Ask questions of your spend from an AI assistant | [The MCP server](https://docs.tensorcost.com/developers/mcp.md) | MCP key |
| Send traces you already collect | [OpenTelemetry ingest](https://docs.tensorcost.com/developers/opentelemetry.md) | SDK key, exchanged for a token |
| Send Claude Code through TensorCost, or see spend per developer | [Coding agents](https://docs.tensorcost.com/developers/coding-agents.md) | A token per developer |
| Send each customer's monthly revenue from your billing system | [Revenue push](https://docs.tensorcost.com/developers/revenue-push.md) | A signing secret |
| Read each customer's daily cost and tokens into your billing job | [Usage pull](https://docs.tensorcost.com/developers/usage-pull.md) | A usage key |
| Price a prompt or audit an invoice before anything is connected | [The CLI](https://docs.tensorcost.com/developers/cli.md) | None |

Your workspace id (the API calls it a tenant id) is on **Connect › SDK setup**. Keys are on **Connect › API keys**; creating them needs a workspace admin. Usage keys can also be made by finance, and revenue signing secrets by admins only.

> [!NOTE]
>
> Everything runs against `https://api.tensorcost.com`. If TensorCost runs in your own cloud, see [Pointing the SDK and API at your install](https://docs.tensorcost.com/byoc/for-developers.md).

> [card] [SDKs](https://docs.tensorcost.com/developers/sdk.md)
>
> Wrap an OpenAI, Anthropic, Bedrock or Vertex client in one line.

> [card] [Control layers](https://docs.tensorcost.com/developers/control-layers.md)
>
> Observe, govern, steer and route, and how to raise them safely.

> [card] [Attribution](https://docs.tensorcost.com/developers/attribution.md)
>
> Tag calls with a customer, feature, team, agent and run.

> [card] [Proxy over HTTP](https://docs.tensorcost.com/developers/proxy.md)
>
> Headers, token exchange and the refusals you can get back.

> [card] [REST API](https://docs.tensorcost.com/developers/api.md)
>
> Read spend, budgets, decisions and recommendations.

> [card] [MCP server](https://docs.tensorcost.com/developers/mcp.md)
>
> Connect an assistant that supports remote MCP servers.

> [card] [Coding agents](https://docs.tensorcost.com/developers/coding-agents.md)
>
> Spend per developer, per-developer budgets, and the Claude Code gateway.

> [card] [Revenue push](https://docs.tensorcost.com/developers/revenue-push.md)
>
> Send each customer's monthly revenue with a signed request.

> [card] [Usage pull](https://docs.tensorcost.com/developers/usage-pull.md)
>
> Read each customer's daily cost and tokens into your billing job.

> [card] [CLI](https://docs.tensorcost.com/developers/cli.md)
>
> Estimate prompt cost and audit an invoice offline.

> [card] [OpenTelemetry](https://docs.tensorcost.com/developers/opentelemetry.md)
>
> Turn GenAI spans into TensorCost observations.


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