palbaseDocs

Palbase ai · API

POST/ai/pools

Make a runner pool

A pool of one type — its machines' operating system (linux or macos) and architecture (amd64 or arm64) — that the project's own machines enrol into with palbase-agent and a single-use key (POST /ai/pools/{pool}/keys). A chat that names it (POST /ai/chats {pool}) runs its workspace's sessions there. Managed through the API, the SDK and the CLI (palbase ai pools): the project scales it itself, reading its state (GET /ai/pools/{pool}/state). A name taken already: 409 pool_exists.

Called by your server, with the project's secret key.

Request body

arch"amd64" | "arm64" · requiredIts machines' architecture.
namestring · requiredIts name: lowercase letters, digits, _ and -, starting with a letter, at most 64; the project's once.
os"linux" | "macos" · requiredIts machines' operating system.
curl
curl -X POST "https://<your-ref>.palbase.studio/ai/pools" \
  -H "apikey: $PALBASE_SECRET_KEY" \
  -H "content-type: application/json" \
  -d '{"arch":"amd64","name":"string","os":"linux"}'

Responses

201The pool

400The request is malformed, or names what this module does not offer (the error names which)

401No valid credential

403A publishable key or a user's session: everything here is the project's server's, called with the secret key

409The response's state refuses it

429The project's request rate, or the provider's for its connection, is used up — or the project holds as much as it may at once: 32 open streams at one of the module's servers (too_many_streams), 2 pictures being made (too_many_images), 512 MiB of pictures kept here for their day (image_storage_full), or the service — or the project's share of it — holds as much of its requests at once as it takes: their bodies, an embedding request's vectors, the pictures being made (busy). Retry-After says when to try again

503The model service or the database did not answer; retry shortly

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation CreatePool of ai's contract.