API ReferenceRuntimes
Create Runtime
Register a self-hosted runtime and get its connection credentials.
Register a self-hosted runtime and get its connection credentials.
Available on Enterprise plans. Bind an agent to the runtime by setting
config.runtime_id on PATCH /api/v1/agents/{agent_id}; from then on that
agent's runs execute on your machine while the recipe, its versions, and run
history stay on Levain.
Authorization
HTTPBearer AuthorizationBearer <token>
In: header
Header Parameters
X-API-Key?string|null
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://api.levainlabs.com/api/v1/runtimes" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{
"id": "string",
"name": "string",
"mode": "string",
"image": "string",
"model_auth": "string",
"status": "online",
"last_seen_at": "string",
"runner_version": "string",
"created_at": "string",
"credentials": {
"runtime_id": "string",
"api_url": "string",
"gateway_url": "string",
"user": "string",
"secret": "string",
"reverse_port": 0,
"forwards": [
{
"local_port": 0,
"remote": "string"
}
],
"heartbeat_seconds": 0
}
}