Skip to content
ACS Infra
Looms

Create Branch

POST
/v1/looms/{loom_id}/nodes/{node_id}/branch

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.

Authorization

bearer
headerAuthorizationBearer <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.

Path Parameters

loom_id*string
Match^([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})$
Formatuuid
node_id*string
Match^([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})$
Formatuuid

Header Parameters

idempotency-key?string

A 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.

Length1 <= length <= 255

Request Body

application/json
  1. body
model*string

The Base model: an id from GET /v1/models, such as llama-8b.

Match^[^\u0000]*$
max_tokens?integer

Generate at most this many tokens for each Node; at most 1000.

Rangevalue <= 1000
temperature?number

Sample less likely tokens more often; 0 takes the most likely token each time. From 0 to 2, as vLLM takes it.

Range0 <= value <= 2
logprobs?|

Return the log probabilities of this many top tokens; at most 100.

Range0 <= value <= 100
top_p?number

Sample from the most likely tokens up to this probability; more than 0 and at most 1, as OpenAI and vLLM take it.

Range0 < value <= 1
top_k?integer

vLLM: sample from this many most likely tokens; 0 or -1 for all.

Range-1 <= value
min_p?number

vLLM: leave out tokens less likely than this fraction of the most likely; from 0 to 1.

Range0 <= value <= 1
presence_penalty?number

Make a token that is already in the text less likely; from -2 to 2.

Range-2 <= value <= 2
frequency_penalty?number

Make a token less likely each time it is already in the text; from -2 to 2.

Range-2 <= value <= 2
repetition_penalty?number

vLLM: divide the scores of repeated tokens by this, more than 0; 1 for none.

Range0 < value
seed?|

From 0. The same seed samples the same tokens; vLLM can still change one now and then when it batches requests.

Range0 <= value
stop?|array<>|

Stop before any of these texts; at most 4.

n?integer

How many child Nodes to make, from 1 to 8.

Range1 <= value <= 8

Response Body

Branch

application/json
  1. response
object*"list"
Value in"list"
data*array<>
Example Request
curl -X POST 'https://api.v2.infra.acsresearch.org/v1/looms/497f6eca-6276-4993-bfeb-53cbbbba6f08/nodes/497f6eca-6276-4993-bfeb-53cbbbba6f08/branch' \  -H 'Authorization: Bearer <API_KEY>' \  -H 'Content-Type: application/json' \  -d '{  "model": "string"}'
Example Response
{  "object": "list",  "data": [    {      "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"      }    }  ]}