Create Run
POST /v1/max-code/projects/{project_id}/build-runs
This operation can change data. Use resources you control.
This operation can spend credits. Save the request or run identifier before retrying.
Request fields
| Field | Location | Type | Required |
|---|---|---|---|
project_id | path | string | Required |
api_key_id | body | string | null | Optional |
api_key_name | body | string | null | Optional |
approved_brief | body | ProductBrief | null | Optional |
expected_revision | body | integer | Required |
idempotency_key | body | string | Required |
prior_plan | body | string | Optional |
request | body | string | Required |
verification_only | body | boolean | Optional |
Examples
Use the environment settings from Quickstart. Replace sample resource IDs with your own. The examples show the required request shape.
import { MaxClient } from "@elmax/api";
const max = new MaxClient({
baseURL: process.env.MAX_API_URL,
apiKey: process.env.MAX_API_KEY,
});
const result = await max.api.postV1MaxCodeProjectsProjectIdBuildRuns({
"path": {
"project_id": "icp_example"
},
"body": {
"request": "example",
"expected_revision": 0.0,
"idempotency_key": "demo-request-001"
}
});
console.log(result);import os
from elmax_ai import MaxClient
with MaxClient(base_url=os.environ["MAX_API_URL"], api_key=os.environ["MAX_API_KEY"]) as max:
result = max.api.post_v1_max_code_projects_project_id_build_runs(**{'path': {'project_id': 'icp_example'},
'body': {'request': 'example',
'expected_revision': 0.0,
'idempotency_key': 'demo-request-001'}})
print(result)