API reference
API v1Endpoints, authentication and responses.
Basics
- OverviewThe base address, the shape of a request and of an answer, and the conventions every operation of the API follows.4 min
- AuthenticationHow a request says who it is — the API key, the one project the key acts in, and the scopes that say what it may do.3 min
- RequestsThe headers a request sends and an answer carries, how a long list is read page by page, and how many requests a key may send.4 min
- IdempotencyThe Idempotency-Key header — which requests require it, what a repeated request is answered with, and how to choose a key.4 min
- Error codesThe envelope of an error, where its code comes from, and every code the API answers with — what each means and asks you to do.4 min
- WebhooksWhat a delivery of a webhook carries, how to check its signature, when it is sent again, and what each family of events reports.6 min
- OpenAPI specificationWhat the OpenAPI document of the Slen API holds, how the pages of this section are made of it, and how to read the page of an operation.3 min
Resources
- OperationsSend a request through the flow bound to an operation code, read the operations — the model calls of the flows — with every attempt behind them, and list the holds of those calls.
- ExecutionsRead the status of an execution while it runs, and its trace node by node once it has moved.
- Customers and creditsAdd your customers, keep their credit accounts, top up, charge and adjust their credits, block a customer, and set what an operation costs in credits.
- ApprovalsList the requests for approval that executions wait on, and approve or reject one.
- ModelsRead the models a request may name and the price each of them is charged at now.
- FlowsCreate a flow, save its draft, check and publish it, roll it back, give it an operation code, and read its executions and analytics.
- BudgetsList the budgets with what is left of them, create a budget, change its limit, and archive or restore it.
- AlertsRead the feed of the alerts that opened in a project, and mark an alert as seen.
- AnalyticsRead what a project spent, how its executions ended, how close the estimates of its model calls were and what its customers cost.
- Ledger entriesRead the journal of the money a project held, gave back and spent, entry by entry.
- Provider connectionsStore the API key of a model provider, check that it works, set its rate limits and take it out of use for a while.
- Provider poolsCreate a pool of provider connections, arrange its members, read their live headroom and how the pool served its calls.
- Health probesTwo probes that take no key say whether the API serves and whether its dependencies answer, and one operation says what happens while the ledger is unreachable.