Authorization: Bearer <key>.
Base URL
| Environment | URL |
|---|---|
| Production | https://litellm-rust.onrender.com |
| Local | http://localhost:4000 |
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Talk to your agents programmatically using the LAP REST API.
Authorization: Bearer <key>.
| Environment | URL |
|---|---|
| Production | https://litellm-rust.onrender.com |
| Local | http://localhost:4000 |
curl -X POST $LAP_URL/api/agents \
-H "Authorization: Bearer $MASTER_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-agent",
"owner_id": "local-user",
"runtime": "cursor",
"model": "claude-opus-4-5",
"system": "You are a helpful assistant."
}'
SESSION=$(curl -s -X POST $LAP_URL/session \
-H "Authorization: Bearer $MASTER_KEY" \
-H "Content-Type: application/json" \
-d '{
"runtime": "cursor",
"agent_id": "<agent-id>",
"prompt": "Summarize the README."
}' | jq -r .id)
curl -X POST $LAP_URL/session/$SESSION/prompt_async \
-H "Authorization: Bearer $MASTER_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": { "modelID": "claude-opus-4-5" },
"parts": [{ "type": "text", "text": "Summarize the README." }]
}'
curl -N "$LAP_URL/v1/sessions/$SESSION/events/stream" \
-H "Authorization: Bearer $MASTER_KEY"
data: {"type":"session.status_running"}
data: {"type":"agent.message","content":"Here is the summary..."}
data: {"type":"session.status_idle"}
import requests
session = requests.post(
f"{LAP_URL}/session",
headers={"Authorization": f"Bearer {MASTER_KEY}"},
json={
"runtime": "cursor",
"agent_id": agent_id,
"prompt": "Hello!",
},
).json()
requests.post(
f"{LAP_URL}/session/{session['id']}/prompt_async",
headers={"Authorization": f"Bearer {MASTER_KEY}"},
json={
"model": {"modelID": "claude-opus-4-5"},
"parts": [{"type": "text", "text": "Hello!"}],
},
)