urllib so it has no third-party runtime dependencies.
Install
meshrouter.
First request
https://api.meshrouter.app/v1. Pass base_url=... to override.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Official meshrouter Python package for sync + streaming MESH calls.
urllib so it has no third-party runtime dependencies.
pip install meshrouter
meshrouter.
from meshrouter import MeshClient
mesh = MeshClient(api_key="mesh_live_...")
reply = mesh.create_chat_completion(
model="auto",
messages=[{"role": "user", "content": "hello MESH"}],
)
print(reply.data["choices"][0]["message"]["content"])
print("receipt:", reply.receipt_id, "$", reply.total_usd)
https://api.meshrouter.app/v1. Pass base_url=... to override.
response = mesh.create_chat_completion(
model="mesh/claude-sonnet-4.5",
messages=[{"role": "user", "content": "stream this"}],
stream=True,
)
for event in mesh.iter_sse(response.data):
if event.event == "message.delta":
print(event.data.get("delta", ""), end="", flush=True)
models = mesh.list_models()
for m in models.data["data"]:
print(m["id"], m.get("owned_by"), m.get("pricing"))
mesh.get_current_account()
mesh.update_account_limits(
"acct_live",
{"monthlyUsdLimit": 500, "requestsPerMinute": 120},
)
mesh.get_usage(account_id="acct_live")
mesh.get_logs(account_id="acct_live", limit=50)
mesh.get_monitoring_summary(account_id="acct_live", window="1h")
intent = mesh.get_payment_intent("pay_live")