API reference · Sim
List runs
GET/v1/sim/runs
Your simulation runs, newest first.
On this page
Auth. An API token: Authorization: Bearer lb_… (create one). Signed-in web sessions work too.
Limits. Counts against your plan's API requests (60, 600 or 3,000 a minute on Free, Builder and Standard).
Parameters
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Page size. 1 to 100. Default 50. |
Request
curl "https://api.langbot.ai/v1/sim/runs?limit=1" \
-H "Authorization: Bearer $LANGBOT_API_TOKEN"import os
import httpx
r = httpx.get(
"https://api.langbot.ai/v1/sim/runs?limit=1",
headers={"Authorization": f"Bearer {os.environ['LANGBOT_API_TOKEN']}"},
)
print(r.json())const res = await fetch("https://api.langbot.ai/v1/sim/runs?limit=1", {
headers: { Authorization: `Bearer ${process.env.LANGBOT_API_TOKEN}` },
});
console.log(await res.json());Response
200 OK
{
"runs": [
{ "id": "run_01K8Z3…", "kind": "server", "event_id": "ev_kxearningsmentiongs_26oct13", "strategy": "buy_yes_on_first_counting_hit", "net": 41.2, "created_at": 1793500000000 }
]
}Errors
| Status | code | When |
|---|---|---|
| 401 | auth_required | No token was sent. |
| 401 | token_invalid | The token was not recognised (mistyped, revoked or expired). |
| 422 | validation_error | A parameter failed validation; detail[].loc names it. |
| 429 | rate_limited | Over your request budget; wait Retry-After seconds. |
Every error body is {"detail": …, "code": "…"}; branch on code. All codes: Errors.