Reference
Models
Run one model directly — no agent in between. The same models, credits and rules as the Run button on each model's page.
Describe a model
GET
/api/v1/models/{id}The id is the last part of the model page's URL: https://corollary-labs.com/models/esmfold2 is esmfold2. The answer lists the inputs the model takes — name, type, whether it is required — and the outputs it returns, which is enough to build a form.
bash
curl https://corollary-labs.com/api/v1/models/esmfold2 \
-H "Authorization: Bearer $COROLLARY_API_KEY"Run it
POST
/api/v1/models/{id}/runsSend the inputs as an object. Fast models answer with 200 and their outputs in the same response. Models that need a GPU started for them answer 202 with a poll_url; omit mode and the platform chooses.
bash
curl https://corollary-labs.com/api/v1/models/esmfold2/runs \
-H "Authorization: Bearer $COROLLARY_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "inputs": { "sequence": "MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQ" } }'inputsobject- The model's input fields, by name — see Describe a model.
mode"sync" | "async"- Optional. Force waiting for the result, or force a background job.
The model run object
idstring- The run, e.g. job_x7k2p9q4.
statusstring- running, succeeded, failed or cancelled.
outputsobject | null- The model's outputs, keyed by the output names the model describes.
errorstring | null- Why a failed run failed.
creditsinteger | null- What the run cost, when it answered inline. Long runs settle on your balance when they finish.
poll_urlstring | null- Where to read a running job.
page_urlstring- The model's page — where a person can run it too.
Poll a long run
GET
/api/v1/model-runs/{id}Read it every few seconds until the status is not running. Reading is also what collects the result, so polling promptly brings it back promptly.
