Integrate AmpLabs into your workflow with the CLI, Python SDK, REST API, or MCP server for AI agents.
Install the amplabs-playground package and use the amplabs command to run simulations, generate LUTs, and manage simulation tokens from your terminal.
pip install "amplabs-playground[cli]"
amplabs login
amplabs simulate --cell LG_M50T --rate 1C --duration 1h
amplabs batch --sweep "temperature 0,25,45" --cell LG_M50T
amplabs lut --tables ocv_soc,dcir --cell LG_M50T
amplabs credits
amplabs cellsUse the Python client for programmatic access. Pass your personal access token when creating the client.
# pip install amplabs-playground
from amplabs import AmpLabs
client = AmpLabs(token="pat_xxx")
result = client.simulate(cell="LG_M50T", current=-5, duration=3600)
print(f"Final voltage: {result.voltage[-1]:.3f} V")All functionality is available via the REST API. Authenticate with a Bearer token in the Authorization header.
# Base URL
https://api.hub.amplabs.ai
# Authentication
curl -H "Authorization: Bearer pat_xxx" \
https://api.hub.amplabs.ai/api/v1/credits/balance| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/spme/simulate | Run a single SPMe simulation |
| POST | /api/v1/spme/batch | Run a batch simulation sweep |
| POST | /api/v1/lut/generate | Generate look-up tables (OCV, DCIR, etc.) |
| GET | /api/v1/profiles | List available cell profiles |
| GET | /api/v1/credits/balance | Check your simulation token balance |
See the full Swagger documentation for request/response schemas and all available endpoints.
Connect AI agents to AmpLabs through the Model Context Protocol. The server is hosted at https://api.hub.amplabs.ai/mcp (streamable HTTP), so there is nothing to install. In Claude Code:
claude mcp add --transport http batterylab https://api.hub.amplabs.ai/mcpOther MCP clients: add a remote (HTTP) server with the same URL. Tools that read or change your account take your personal access token as auth_token.