Error Responses
Error responses vary slightly by endpoint. The most common error response shape is:success.
Some omit error and return only msg or message.
Rate Limits
How rate limits are applied
Vast.ai applies rate limits per endpoint and per identity. This is enforced as a minimum interval between requests for a given endpoint and identity. The identity is determined by: bearer token + session user +api_key query param + client IP.
Some endpoints also use method-specific limits (GET vs POST) and/or max-calls-per-period limits for short bursts.
Rate limit response behavior
When you hit a rate limit, you will receive HTTP 429. The response body is often plain text (in certain cases JSON withsuccess/error/msg like above) with one of the following messages:
Retry-After), so clients should apply their own backoff strategy.
How to reduce rate limit errors
- Batch requests where supported, rather than calling many single-item endpoints.
- Reduce polling: use longer polling intervals, or cache results client-side.
- Spread traffic over time: avoid bursts; use a queue or scheduler.