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. Unlike other services, this is enforced as a minimum interval between requests for a given endpoint and identity, and enforcement is not a binary wall, but determined probabalistically. The identity is determined by: bearer token + session user +api_key query param and falls back to client IP.
Rate limit response and recommended retry behavior
When you hit a rate limit, you will receive HTTP 429. The response body will typically return an acceptable threshold number in seconds: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.