/v1/api/actionsAPI keyGenerate an artifact
Build a structured artifact from the project's corpus, with each section citing the cells it rests on.
State the purpose in prose — what the document should produce — rather than a template. The corpus decides the sections; the purpose decides what is worth saying.
**Generation is detached.** The dispatch returns a running task; poll it, or watch the file stream to see the artifact land. Naming an existing `artifactId` is refused on the API surface today — omit it to generate a new one.
The artifact lands under `Artifacts/`, which is the classification rather than a naming convention: the pipeline treats it as a derived product and will not read it back as evidence. Promoting it to source is the folder move in the Changes lane, and is a deliberate act.
Dispatched as `{"action": "artifact_update", "input": {"purpose": "..."}}`.
Body
| Field | Type | Required | Description |
|---|---|---|---|
| action | string | required | Must be `"artifact_update"`. |
| input.artifactId | string | optional | Existing artifact id to update; omit to generate a new one. |
| input.purpose | string | required | What the artifact should produce. |
curl -X POST "https://runlog-7613480744.us-central1.run.app/v1/api/actions" \
-H "Authorization: Bearer $RUNLOG_API_KEY" \
-H "X-Project-Id: p7Kd2mQx" \
-H "Content-Type: application/json" \
-d '{
"action": "artifact_update",
"input": {
"purpose": "an envelope takeoff for the north elevation, with the glazing schedule"
}
}'{
"action": "artifact_update",
"result": {
"artifactId": "art_5Hn2Kp",
"status": "running",
"taskId": "tk_6Wr4Bn"
}
}Errors
| Status | error | When |
|---|---|---|
| 400 | purpose is required | The input named no purpose. There is nothing to build the document against. |
| 400 | artifactId is not accepted on this surface | A revision was requested. Omit the id to generate a new artifact. |
| 403 | action not available to an API key | The key's tier does not reach this action. |
| 400 | invalid request body | The body is not JSON, or exceeds the 1 MB request-body cap. |
| 401 | invalid API key | The `Authorization` header is missing, malformed, or names a revoked key. |
| 400 | name the target project via the X-Project-Id header or projectId query | No project was named and the key is not bound to one. |
| 429 | rate limit exceeded | You passed 60 requests/minute on this key. `Retry-After` carries the seconds to wait. |
| 500 | internal error | The relay failed to serve the request. Retry with backoff; the cause is logged server-side against your request. |