API ReferenceAgents
Build Version
Launch a build against an agent version.
The prompt describes the change the build should make. Returns a run_id the
caller can poll or send follow-up messages to. Only DRAFT versions can be
built; published versions are immutable — fork a new draft via POST /versions
with parent_version first.
Authorization
HTTPBearer AuthorizationBearer <token>
In: header
Path Parameters
agent_id*Agent Id
version*Version
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/agents/string/versions/0/build" \ -H "Content-Type: application/json" \ -d '{ "prompt": "string" }'{
"run_id": "string",
"session_id": "string",
"agent_id": "string",
"version": 0,
"status": "string",
"created_at": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}