Settings that travel with the key.

Change routing, retry, fallback or limits on the key in the dashboard. No client code changes, and a request can still override them.

Keys and organization

Settings per key
12
Default mode
autoCheapest
Fallback on a new key
On
Retry on a new key
Off

01Defaults

A new key, unchanged.

API key settings and their defaults
SettingDefaultOptionsRequest field
Routing modeautoCheapestpriority, autoCheapest, autoFastest, autoMostReliablesettings.routing.mode
Provider orderNoneAny providers, in ordersettings.routing.providerOrder
Excluded providersNoneUp to 20settings.routing.excludedProviders
Own provider keysfirst (inherits the workspace)first, only, offsettings.routing.byok
Key poolallall, platformOnlysettings.routing.keyPoolMode
Auto RetryOff0 to 10 retriessettings.retry
Auto FallbackOn, 20 to 20 fallbackssettings.fallback
Proxy reuseOffOn, offsettings.allowProxyReuse
Response statisticsOffOn, offsettings.statistics
Detailed analyticsOnOn, offsettings.analytics
Spend capsNoneUp to 5, per any whole number of hours, days or weeks up to 90 days, or in totalKey only
Concurrent tasks–Up to 100,000Key only

02Request

The same settings, sent with one request.

Each field overrides the key for that request only.

  • A field in the request wins.
  • Otherwise, the key's setting applies.
  • Otherwise, the default in the table above.
Settings in the API reference

settings, in POST /createTask

{
  "settings": {
    "routing": {
      "mode": "autoCheapest",
      "keyPoolMode": "all"
    },
    "fallback": {
      "enabled": true,
      "maxFallbacks": 2
    },
    "allowProxyReuse": false,
    "statistics": false,
    "analytics": true
  }
}

03FAQ

Questions about API Key Settings.

01

Can I override the mode in API requests?

Yes, send settings.routing on the request (mode, provider, providerOrder) to override the key defaults.
02

Which value wins when the request and the key disagree?

The request, for that task only. A field the request leaves out takes the key's setting, and a setting never changed on the key takes the built-in default.