Create a collection job
Send prompts to AI engines, with repeated samples. Returns a job ID at once. The maximum cost is held, each answer is settled separately, and failures are released. A submitted job cannot be cancelled.
Price
- Price
- Charged per answer; the price depends on the platform
- Answers not collected
- Not charged
The maximum cost is held at submission and each answer is settled separately. Answered, no-answer and refused results are charged; only answers that were not collected are free, and their hold is released. See per-platform prices on the pricing page, or call Quote a job first to get the maximum.
Parameters
Send these in the JSON body, not in the URL.
promptsarray of stringsRequired
The questions to ask. 1–100 items, each up to 2,000 characters, no duplicates.
enginesarray of stringsRequired
Platform IDs to collect from, such as chatgpt.web. The website, app and official API of one AI have separate IDs. At least 1 item, no duplicates.
samplesinteger, default 1
How many times to ask each question on each platform. Questions × platforms × runs can be at most 500. Range 1–100.
countrystring
Two-letter country code, such as US. Only countries tested for every selected platform are accepted.
regionstring
A province or city. Only regions tested for every selected platform are accepted. Up to 50 characters.
tierbasic or full, default basic
Basic or full tier. Every selected platform has to offer it.
screenshottrue or false, default false
Save a screenshot. Every selected platform has to support it. Charged extra, and only when a screenshot is captured.
thinkingtrue or false, default false
Turn on thinking mode. Every selected platform has to support it. Charged extra, and only when it was used.
fallbacktrue or false, default true
Allow a backup route with the same surface and login state when a capture fails. The price is the same, and channel.fallback is true in the result.
prompt_setobject
A name and version for this set of questions. Two jobs can be compared only when the set, version and questions all match.
prompt_set.namestring
Name of the question set. Up to 100 characters.
prompt_set.versionstring
Version of the set. Change it whenever the questions change. Up to 50 characters.
tagsarray of strings
Your own labels, such as a campaign ID. Up to 10 items, each up to 100 characters, no duplicates.
Headers
AuthorizationRequired
Bearer followed by your API key.
Idempotency-KeyRecommended
An ID you choose, up to 255 characters with no spaces. After a network error, resend with the same value and nothing is created or charged twice. It is remembered for 12 months. The same value with different parameters returns idempotency_conflict.
X-Max-PriceOptional
The most you are willing to spend in US dollars, such as 0.50. If the request could cost more, it is refused: nothing runs and nothing is charged.
X-SourceOptional
Your own label, such as the product the call came from, up to 100 characters. Usage can be broken down by it.
X-End-UserOptional
Your own label for the end user this call serves, up to 100 characters. Do not put names, emails or other personal data in it.
Response
A successful call returns HTTP 202 with the data in data.item, one Job object. Every field is always present: [] means none this time and null means not available or unknown.
| Field | Type | Description |
|---|---|---|
id | string | Job ID |
status | "queued" | "running" | "completed" | "partial" | "failed" | queued: not started. running: in progress. completed: all done. partial: some failed. failed: all failed |
total | integer | Total number of answers |
counts | { answered: integer, no_answer: integer, refused: integer, failed: integer, pending: integer } | How many answers are in each status. pending means not finished yet |
max_charge | string | The most this job can cost, which is the amount held at submission |
held | string | The amount still on hold |
charged | string | The amount charged so far |
prompt_set | { name: string, version: string | null } | null | The question set given at submission, or null |
tags | string[] | The labels given at submission |
created_at | string | When the job was submitted |
completed_at | string | null | When every answer finished; null until then |
retry_after_seconds | integer | null | How many seconds to wait before checking again; null once the job has finished |
Common errors
An error means nothing was charged, except settlement_unknown: it means billing is not known yet, so ask again with the same Idempotency-Key. See every error code.
| Error | HTTP | Meaning | Charged? |
|---|---|---|---|
invalid_params | 400 | A parameter is invalid | Not charged |
engine_unavailable | 400 | This engine is not available now | Not charged |
parameter_not_supported | 400 | This engine does not support that parameter | Not charged |
trial_not_available | 403 | Trial credit cannot be used with this engine; it is available after a top-up | Not charged |
max_price_exceeded | 400 | The most this could cost is above the limit you set | Not charged |
insufficient_balance | 402 | The balance is too low | Not charged |
key_budget_exceeded | 402 | This key's spending limit does not cover it | Not charged |
idempotency_conflict | 409 | This Idempotency-Key was used for a different request | Not charged |
job_limit_exceeded | 429 | Too many unfinished answers, or too much held; submit again when some have finished | Not charged |
settlement_unknown | 500 | Whether this was charged is not known yet; ask again with the same Idempotency-Key | Unknown yet |
unauthorized | 401 | No credential was sent, or it is invalid, disabled or expired | Not charged |