Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tensormesh.ai/llms.txt

Use this file to discover all available pages before exploring further.

Use the Control Plane SDK surface when you are managing Tensormesh resources instead of sending inference requests. Common tasks include:
  • reading the current user profile or API keys
  • browsing models and related inventory
  • checking balance, transactions, and support tickets
  • accessing admin or observability APIs from application code
The control-plane SDK surface lives under client.control_plane. Use it with a control-plane bearer token:
from tensormesh import Tensormesh

client = Tensormesh(control_plane_token="YOUR_CONTROL_PLANE_TOKEN")
When you compare this guide to the generated Control Plane reference, remember that some mixed resource families include both standard and admin routes, and some internal-only routes such as Stripe webhook delivery are intentionally omitted from the public SDK surface.

Start With Common Read-Only Tasks

from tensormesh import Tensormesh

client = Tensormesh(control_plane_token="YOUR_CONTROL_PLANE_TOKEN")

profile = client.control_plane.users.get_auth_profile()
api_keys = client.control_plane.users.api_keys.list()

print(profile.display_name)
print([item.name for item in api_keys])

Work With Models

from tensormesh import Tensormesh

client = Tensormesh(control_plane_token="YOUR_CONTROL_PLANE_TOKEN")
models = client.control_plane.models.list()

for model in models:
    print(model.model_id, model.model_name)

Check Billing And Support

from tensormesh import Tensormesh

client = Tensormesh(control_plane_token="YOUR_CONTROL_PLANE_TOKEN")

balance = client.control_plane.billing.balance.get()
tickets = client.control_plane.support.tickets.list(size=20)

print(balance.units if balance is not None else "0")
print([ticket.subject for ticket in tickets.tickets])

Stripe Billing Flows

from tensormesh import Tensormesh

client = Tensormesh(control_plane_token="YOUR_CONTROL_PLANE_TOKEN")

customer = client.control_plane.billing.stripe.customer.get_or_create()
payment_methods = client.control_plane.billing.stripe.payment_methods.list()
setup_intent = client.control_plane.billing.stripe.setup_intents.create()

print(customer.stripe_customer_id)
print(payment_methods.stripe_payment_method_ids)
print(setup_intent.client_secret)

Auto-Pagination

Use auto_paging_iter(...) on paged resources when you want items instead of manual page handling.
from tensormesh import Tensormesh

client = Tensormesh(control_plane_token="YOUR_CONTROL_PLANE_TOKEN")

for transaction in client.control_plane.billing.transactions.auto_paging_iter(
    page_size=100,
):
    print(transaction.transaction_id, transaction.amount)

Async Control Plane Usage

import asyncio

from tensormesh import AsyncTensormesh


async def main() -> None:
    async with AsyncTensormesh(
        control_plane_token="YOUR_CONTROL_PLANE_TOKEN",
    ) as client:
        tickets = await client.control_plane.support.tickets.list(size=20)
        print([ticket.subject for ticket in tickets.tickets])


asyncio.run(main())
Use the Control Plane API tab in the docs navigation for generated management API reference.