Skip to content
AIRO

Errors, limits and billing

Every error is structured and written to be shown to a person.

Error format

{
  "error": {
    "code": "validation_failed",
    "message": "2 of 120 orders could not be used. Fix the listed problems and send the request again with a new Idempotency-Key.",
    "fields": [
      { "field": "orders[17]", "message": "The address is incomplete. Add a street number and a city or postal code." }
    ]
  }
}

code is stable and safe to branch on. message is human readable. fields points at the input path (orders[17]) when the problem is in your data. Requests that fail JSON schema validation return 422 with the failing field and reason.

Common codes

StatusCodeWhat to do
402payment_requiredA baseline is free once you have paid for an optimized plan. Run an optimized plan first.
409job_not_completedThe result is not ready. Poll the optimization first.
422idempotency_key_requiredAdd an Idempotency-Key header (8 to 128 characters).
422validation_failedOrders or vehicles were rejected. See fields.
422too_many_locationsOne plan can have up to 300 distinct locations (depot, stops, pickups, vehicle start and end points). Split the orders by zone or day.
422too_many_orders / too_many_vehiclesAbove 500 orders or 100 vehicles per optimization. Split by zone or depot.
429too_many_active_jobsTwo optimizations are already running. Wait for one to finish.
429rate_limitedSlow down and retry.
503jobs_pausedMaintenance. Retry in a few minutes.

Limits

  • Up to 500 orders and 100 vehicles per optimization, one depot.
  • Solver time limit 1 to 60 seconds (default 10).
  • Request body up to 256 KB.
  • Unassigned orders are not errors: they are returned with a reason so you can fix and re-run.

Billing

  • Pay per plan: each optimization is priced from its size (stops, distinct locations) and option (traffic or not). POST /v1/optimizations/quote returns the prices; the created optimization is unpaid with links.payment until it is paid, then runs. A paid optimization that fails or is cancelled is refunded automatically. Baseline comparisons are free after your first payment.
  • Subscriptions, paid monthly or yearly (12% off): usage is metered by orders optimized, vehicles planned and scenarios executed, with overage.
  • Usage is recorded only when an optimization completes successfully. Failed and cancelled runs are never billed. API calls themselves are not metered.

Best practices

  • Store the optimization id with your dispatch run, and use the run id in the Idempotency-Key.
  • Provide coordinates when you have them: it is faster and avoids geocoding failures.
  • Treat unassigned orders as a work list: show the message, fix the cause, run again.
  • Verify webhook signatures and keep polling as a fallback.