CodeMeaningTypical fix
401Invalid or missing tokenAdd Authorization: Bearer … header
403Key disabled / quota exceededCheck dashboard usage or ask for upgrade
422Validation errorDouble-check required fields – most common: user_id missing
429Rate limitedExponential back-off, then retry

Common mistakes

  1. You sent both agent_id and user_id blank – at least one is required.
  2. JSON body isn’t an array of messages – wrap single message in [].
  3. Using an expired key from staging.