REST API
Use the REST API when your own backend, worker, or script needs to execute a published model. Public consumers should call the Gateway. Do not call internal services directly.Base URL
Use the Gateway URL for your environment:Authentication
Server-to-server requests use an API key:Authorization: Bearer <access_token>
is only for signed-in browser sessions; developer integrations should use
X-API-Key.
Execute a model
Request fields
Use
params, not parameters. Vector routing fields such as resources,
alias, collection, and namespace are managed by the platform and must not
be supplied by clients.
For vector-backed index and search modes, use the same scope for the data
you want to search. For example, if images are indexed with scope: "test",
search requests must also use scope: "test". Knowledge Bases displays indexed
data by model, collection, and scope.
Valid scopes start with a letter or number, may contain letters, numbers, .,
_, and -, and are limited to 64 characters.
Upload media for model inputs
Models that accept images, audio, video, or files usemedia_ref values in
input. Upload the file through the public media API first:
upload_url, then complete the upload:
media_ref inside POST /api/runs.
Related APIs
GET /api/marketplace/modelslists published Marketplace models.GET /api/marketplace/models/{slug}loads one Marketplace model detail page.POST /api/media/upload/initstarts a developer media upload.POST /api/media/upload/completereturns themedia_reffor a completed upload.GET /api/billing/walletloads the current workspace wallet.GET /api/billing/usage/summaryloads usage summary for the current workspace.