source, allowFallbacks, and ignoreSources when you want a say
in which sources may serve it.
Every API accepts these three optional fields in the request body, next to its normal input.
They apply to one request only. There is no account-wide or per-key setting.
Find source ids
Source ids are published inlanes[].source.id on GET /catalog, no key needed, and on /apis:
The default: cheapest serves
Without any of the fields, the cheapest source serves and failover is automatic.Allow only some sources
To allowlist sources, sendsource with allowFallbacks: false:
allowFallbacks: false, only that source serves, at its price.
You are quoted and charged exactly that price, with no failover.
Skip sources
SendignoreSources to skip sources for this request:
Prefer without restricting
source on its own is a preference:
null counts as if you left the field out.
Errors
None of these charge you. The 400s returncode: "invalid_input" with an error message that
starts with source_unknown:, gives the reason, and lists the valid source ids for the API.
Pagination
To keep the restriction on every page, send the samesource and allowFallbacks: false with
each page’s cursor. The list must include the source that served page one, or the request is
rejected with HTTP 400. See Pagination.
Example
source object (id, name, kind, artworkKey) for
the source that served, so you can reuse its id on your next call. These fields combine with
preferLatencyUnderMs; see Speed and price.