Skip to main content

Official Python SDK for MESH Router (api.meshrouter.app) — one OpenAI-compatible endpoint across 45 models from 14 providers, with USDC payments and signed receipts.

Project description

meshrouter

Python SDK for the MESH Router API.

from meshrouter import MeshClient

client = MeshClient(api_key="mesh_live_...")
response = client.create_chat_completion(
    model="auto",
    messages=[{"role": "user", "content": "route this"}],
    stream=True,
)

for event in client.iter_sse(response.data):
    print(event.event, event.data)

The client defaults to https://api.meshrouter.app/v1 and sends MESH bearer API keys when api_key is provided. Accountless x402 challenge creation can be called without a key.

Operations helpers are included for accounts, API-key limits, usage, logs, receipts, provider health/configuration, monitoring summaries, and payment intent lifecycle calls.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meshrouter-0.2.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meshrouter-0.2.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file meshrouter-0.2.0.tar.gz.

File metadata

  • Download URL: meshrouter-0.2.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for meshrouter-0.2.0.tar.gz
Algorithm Hash digest
SHA256 bf252590df31a61d7894aa86ae6771a2a4e1c18567739fac79a8437082055009
MD5 ee0408a3bad5d1c25b400f664cc6e5a7
BLAKE2b-256 6a07aee0d7a93baf2e5932247b43879a8bee49bde677f070e9f4ee1cb298bc21

See more details on using hashes here.

File details

Details for the file meshrouter-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: meshrouter-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for meshrouter-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 987b54d5bedb33a76c626b9a5fd097958db13c1032d256eb4ea6612f6c0a52f4
MD5 9c71624a03dc6dbb5c62b217c0cea2df
BLAKE2b-256 ae926d2ce18c845de0289a15c67804f79b6041c5f46dc9f295d28acf52d24342

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page