Cancel Loom
Stop each Node of the Loom that is queued or running, and answer the Loom. Each becomes cancelled: a running Node keeps the text it grew, and its tokens so far are charged; a queued Node never runs and holds nothing.
bearerAuthorizationBearer <token>An API key: Authorization: Bearer sk-acs-..., or a key of the old platform, acs-bm-.... A User makes and revokes keys in the App.
loom_id*string^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$uuididempotency-key?stringA key of your choice, 1 to 255 characters, such as a UUID. A retry with the same key and the same request does the work once: it gets the first answer, and is never charged twice. Kept 24 hours, one set for each User across all their API keys.
1 <= length <= 255Loom
application/json- response
id*string^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$uuidobject*"loom""loom"created_at*integerWhen the Loom was made, in Unix seconds.
title*stringThe Loom's name. Empty until its first Branch names it after the first line of its root, or a rename names it.
pinned*booleanA pinned Loom comes first in the list.
nodes*array<>Depth first from each root: each Node comes after its parent and before its next sibling, and siblings come in the order they were made.
curl -X POST 'https://api.v2.infra.acsresearch.org/v1/looms/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel' \ -H 'Authorization: Bearer <API_KEY>'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "object": "loom", "created_at": 0, "title": "string", "pinned": true, "nodes": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "object": "loom.node", "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef", "status": "queued", "text": "string", "logprobs": { "text_offset": [ 0 ], "token_logprobs": [ 0 ], "tokens": [ "string" ], "top_logprobs": [ { "property1": 0, "property2": 0 } ] }, "error": { "message": "string", "type": "string", "param": "string", "code": "string", "retryable": true, "retry_after_seconds": 0, "upstream_status": 0, "request_id": "string" }, "request": { "model": "string", "max_tokens": 32000, "temperature": 0, "logprobs": 0, "top_p": 0, "top_k": 0, "min_p": 0, "presence_penalty": 0, "frequency_penalty": 0, "repetition_penalty": 0, "seed": 0, "stop": "string" } } ]}Stream Loom GET
Follow a Loom as Server-Sent Events: each Node of the Loom, then each Node again when its status or text changes, then `[DONE]` when no Node is `queued` or `running`. A running Node's text is its whole text so far, at most every 250 ms.
Create Branch POST
Grow a Branch under a completed Node: `n` child Nodes, each one Completion of its text. The text of a Node is the text on the path from the root to it. The server writes the new Nodes as their tokens arrive, also when no client is connected. Answers the new Nodes, `queued`. For a Node that is not completed, 409 and the error object. For a model that the API does not serve, 400 `model_not_found`, and no Node is made. If the token budget cannot hold one Node's Completion, 429 `budget_exceeded` and no Node is made.