Docs Reference Control API On this page Control API
The Control API manages your organization: models, deployments, keys, usage and billing. The CLI and the dashboard use it. Every operation here is in the contract contracts/openapi/control.yaml.
Base URL and authentication#
The base URL is $EMBER_API_URL/control/v1. Send an API key as Authorization: Bearer <key>. Each operation needs one action, and each role allows a set of actions. The Glossary lists the roles.
The column Key tells you if an API key can call the operation:
Yes : an API key or a dashboard session.
No : only a person signed in to the dashboard. These operations change people, money or keys.
Only : only an API key with the scope inference.
Example#
curl "$EMBER_API_URL/control/v1/deployments?limit=20" \
-H "Authorization: Bearer $EMBER_API_KEY"
Lists have data and next_cursor. To get the next page, send cursor=<next_cursor>. A request that makes something can have the header Idempotency-Key, so that a retry does not make it two times.
Organization#
Method and path Use Key GET /organizationGet the organization: name, plan, region and sign-in rules. Yes GET /regionsList the regions of the organization and their GPU classes. Yes GET /membersList the members and their roles. Yes POST /membersInvite a member by email. No PATCH /members/{user_id}Change the role. billing and viewer revoke the member's keys. No DELETE /members/{user_id}Remove a member and revoke the keys that the member made. No GET /audit-eventsList the audit events, newest first. No GET /telemetry-exportGet the OpenTelemetry export. Header values are never returned. Yes PUT /telemetry-exportSet the OpenTelemetry export. No DELETE /telemetry-exportStop the OpenTelemetry export. No
Security and residency#
Method and path Use Key GET /organization/encryption-keyGet who manages the key that protects the data of the organization. Yes PUT /organization/encryption-keySet your own KMS key. No GET /residency-reports/{month}Get the signed residency report of one month. Yes GET /residency-keysList the public keys that sign residency reports. Yes GET /api-keysList the API keys. No POST /api-keysMake an API key, optionally for some models only. Shown one time. No DELETE /api-keys/{key_id}Revoke an API key. No
Models, adapters and fine-tuning#
Method and path Use Key GET /modelsList the models of the organization. Yes POST /modelsRegister a model from a hub, a package or a container. Yes GET /models/{model_id}Get one model. Yes DELETE /models/{model_id}Delete a model that no deployment uses. Yes POST /models/uploadsStart an upload of model files or training data. Yes POST /models/uploads/{upload_id}/completeFinish an upload. Yes GET /adaptersList the LoRA adapters. Yes POST /adaptersRegister a LoRA adapter. Yes GET /adapters/{adapter_id}Get one adapter. Yes DELETE /adapters/{adapter_id}Delete an adapter that no deployment serves. Yes GET /fine-tuning/jobsList the fine-tuning jobs. Yes POST /fine-tuning/jobsStart a fine-tuning job. Yes GET /fine-tuning/jobs/{job_id}Get one fine-tuning job. Yes POST /fine-tuning/jobs/{job_id}/cancelCancel a job and delete its training data. Yes
Deployments#
Method and path Use Key GET /deploymentsList the deployments. Yes POST /deploymentsMake a deployment. Yes POST /deployments/forecastEstimate the cost of a deployment. Nothing is made. Yes GET /deployments/{deployment_id}Get one deployment. Yes PATCH /deployments/{deployment_id}Change the model, GPUs, regions or runtime settings. Yes DELETE /deployments/{deployment_id}Delete a deployment. Yes POST /deployments/{deployment_id}/scaleChange the replicas, idle time or target queue. Yes GET /deployments/{deployment_id}/revisionsList the revisions. Yes POST /deployments/{deployment_id}/rollbackGo back to an earlier revision. Yes POST /deployments/{deployment_id}/canarySend a percentage of the traffic to the current revision and the rest to the previous one. Yes POST /deployments/{deployment_id}/promoteCopy a built revision of another deployment, for example staging, to this deployment. Yes GET /deployments/{deployment_id}/adaptersList the adapters that the deployment serves. Yes PUT /deployments/{deployment_id}/adaptersSet the adapters that the deployment serves. Yes GET /deployments/{deployment_id}/secretsList the names of the secrets. Yes PUT /deployments/{deployment_id}/secrets/{name}Set a secret. Yes DELETE /deployments/{deployment_id}/secrets/{name}Delete a secret. Yes GET /deployments/{deployment_id}/exportExport a ready revision for a Helm chart. Yes GET /deployments/{deployment_id}/metricsGet requests, errors, latency and replicas in 5-minute buckets. Yes GET /deployments/{deployment_id}/logsGet the log lines of the replicas, the build and the platform. Yes POST /playground/invokeSend a chat request from the dashboard playground. No
Customer clusters#
Method and path Use Key GET /clustersList the customer clusters. Yes POST /clustersAdd a customer cluster. No GET /clusters/{cluster_id}Get one cluster. Yes DELETE /clusters/{cluster_id}Remove a cluster. No POST /clusters/{cluster_id}/registration-tokenMake a registration token for the cluster agent. No
Async requests and batches#
Method and path Use Key POST /async/chat/completionsQueue one chat request. Only GET /async/{job_id}Get the status and, when done, the answer. Only DELETE /async/{job_id}Delete a queued request or its answer. Only POST /batchesQueue up to 1,000 chat requests. Only GET /batches/{batch_id}Get the status and the counts of a batch. Only GET /batches/{batch_id}/resultsGet the finished requests of a batch. Only
Usage, billing and service levels#
Method and path Use Key GET /usageGet the cost for each day, each item, or each API key (group_by). Yes GET /usage/requestsList each inference request with its cost, at most 31 days. Yes GET /invoicesList the invoices. No GET /billing/limitsGet the monthly spend limit and the spend of this month. No PATCH /billing/limitsChange the monthly spend limit. No GET /budgetsList the budgets of keys, members and deployments. No POST /budgetsAdd a budget for a key, a member or a deployment. No PATCH /budgets/{budget_id}Change a budget. No DELETE /budgets/{budget_id}Delete a budget. No GET /sloGet the availability and cold start results of the last three months. Yes GET /model-costsGet what each shared model cost Nuemetrix to serve in the last 7 days. Yes
Errors#
Errors have the same body as the inference API: error.code, error.message and error.request_id. An error about one field also has error.field.
Status Code Meaning 400 invalid_requestA field is not valid. error.field names it. 401 unauthenticatedThe key or the session is missing or not valid. 403 permission_deniedYour role or key cannot do this action. 403 step_up_requiredThe dashboard must check your second factor again. 403 plan_requiredYour plan does not include this. For example, a Free plan cannot make deployments. 404 not_foundThe item does not exist in your organization. 409 conflictThe item is in use or in the wrong state. For example, a model that a deployment uses. 409 idempotency_conflictThe Idempotency-Key was used before with a different body. 429 rate_limitedToo many requests. Wait, then send again. 500 internal_errorNuemetrix had a problem. Send again later, and keep the request ID.
Plan limits#
Plan Deployments Free None. Use shared models. Pro Up to 20 deployments and 50 replicas in total. Enterprise As in your contract.