Errors and rate limits

The error body, status codes you should handle, plan limits and the per-key rate limit headers.

A request that fails returns an HTTP status code of 400 or higher and a JSON body that explains why. This page shows what the body looks like, which status codes your code should handle, and how the rate limits work.

Error body

Every error body has a detail field. Its type depends on the kind of error:

Kinddetail isExample
Most errorsA message (string){"detail": "API key revoked"}
Validation errors (422)A list of objects with loc, msg and type{"detail": [{"loc": ["body", "name"], "msg": "Field required", "type": "missing"}]}
Errors your code should branch onAn object with code and message{"detail": {"code": "email_unverified", "message": "Verify your email address to continue."}}

Messages are written for people and can change. Do not match on message text. Where a code exists, match on that. Otherwise use the status code.

Status codes

StatusMeaningWhat to do
400The request is well formed but not acceptable. The message says why.Fix the request. Do not retry unchanged.
401The credential is missing, invalid, expired or revoked.Sign in again or create a new key. See Authentication.
402A plan limit was reached (see Structured errors).Free up space or upgrade the plan.
403The credential is valid but not allowed: the key lacks a scope, your role is too low, the action needs a session, or the email is not verified.Use a key with the right scope or a user with the right role.
404Not found, or not visible to you. mlflow never confirms that another organisation's id exists.Check the id and your access.
409The request conflicts with the current state. Examples: the deployment is not active, or an Idempotency-Key is still being processed.Change the state, or wait and retry.
413An uploaded file is too large.Send a smaller file.
415The file type is not supported (for batch predictions, use .csv, .xlsx or .parquet).Convert the file.
422Validation failed, or an Idempotency-Key was reused with a different request.Fix the request.
429Too many requests.Wait Retry-After seconds, then retry.
503A dependency is unavailable. The idempotency key store is one example.Retry after the Retry-After delay.

Treat every other 5xx as a temporary server problem and retry with a delay, as described in Retrying safely.

Structured errors

Two errors carry an object in detail so that a client can react to them.

Email not verified. Status 403, code: "email_unverified". The web app uses it to show its verification screen. See Authentication.

Plan limit. Status 402, code: "plan_limit". It appears on hosted plans when an action would exceed the limits of the workspace's plan:

json
{
  "detail": {
    "code": "plan_limit",
    "limit": "datasets",
    "current": 10,
    "max": 10,
    "plan": "free",
    "message": "Limit reached — Datasets: 10 of 10 on the Free plan. Upgrade on the Usage & plan page."
  }
}

limit is one of dataset_size, datasets, storage, concurrent_trials, members and gpu. current and max are counts, or bytes for dataset_size and storage. The limits depend on the plan; see Usage & plan in the workspace settings. A self-hosted server has no plan limits. The numbers in the example are only an illustration.

Rate limits

mlflow limits how fast a client can send requests. All limits use a sliding window. The operator of a self-hosted server can change them; the values below are the defaults.

API keys

Requests made with an API key are limited per key: 600 requests per 60 seconds. Requests made with a session token are not counted against this limit.

Every response to a request made with an API key carries three headers:

HeaderMeaning
X-RateLimit-LimitRequests allowed per window
X-RateLimit-RemainingRequests left in the current window
X-RateLimit-ResetSeconds until a slot frees up

When the window is full, the API answers 429 with the message "API key rate limit exceeded", the same three headers and a Retry-After header with the number of seconds to wait.

Other limits

These protect sign-in and public endpoints. A limited request gets 429 with Retry-After; these responses do not carry the X-RateLimit-* headers.

WhatDefault
Sign-in10 per minute per IP address; 5 per minute per email and IP address
Sign-up5 per hour per IP address
Password reset5 per hour per IP address; 3 per hour per email address
Email verification10 per hour per IP address; 3 per hour per email address
Public endpoints (public access mode)60 predictions per minute per IP address
AI advisor30 requests per 5 minutes per user

Retrying safely

A good client retries only what is safe to retry.

  1. 429: wait for the number of seconds in Retry-After, then retry. Any method can be retried, because the request was not processed.
  2. 503, 500, 502, 504: wait, with exponentially growing delays and some random jitter, then retry. Retry only requests that are safe to repeat: GET, PUT, DELETE, and POST requests that carry an Idempotency-Key. Without the key, a retry of a POST that timed out could create the same run or job twice.
  3. 409 with Retry-After: the first request with this idempotency key is still running. Wait and retry with the same key.
  4. 400, 401, 403, 404, 422: do not retry unchanged; the result will be the same.
  5. Watch the headers. Slow down when X-RateLimit-Remaining gets close to zero, instead of waiting for a 429.

Build these rules into your HTTP client. Pagination and idempotency explains the idempotency key.

Updated 2026-11-22