Collect AI answers from one source
Run a saved prompt against one available platform and collection mode, then read the result.
1. Choose an available source
Start with the first authenticated request to check your key. Follow the source coverage guide to call GET /v2/account?view=sources. Pick one row from data.capabilities with available: true. If no row is available, stop here.
2. Start a collection for that pair
You need a brand you can access and a saved prompt for that brand. Starting a run requires collections:write and an editor, owner, or service role. Polling requires collections:read.
Build collection.json using the collection recipe. Put one saved prompt ID in prompt_ids and one object in sources. Copy both platform and mode from the same available row into that object. Use the country and language of the market you want to measure.
Collection can use credits. Set max_units to the maximum number of units you authorize. Follow Start a collection to send POST /v2/runs with workflow set to collect and the Idempotency-Key header.
If POST /v2/runs returns HTTP 503 with source_pending, wait for the delay in the Retry-After header before retrying. If the code is feature_not_offered, stop and check which sources are available. If you choose a different available platform and mode, submit a new request with a new Idempotency-Key.
3. Poll and read the result
Use the polling recipe to read data.poll_url from the accepted response and check the run state. Once the run finishes, follow Read the result to inspect the counts and observation IDs or check the returned error.