Before you begin
You need an API key. Create one on the API keys page of the dashboard. New accounts start with 500 free credits. API plans and credits covers pricing.1. Set your API key
2. Submit a task
Ask Gemini a question.taskType picks the engine; payload.prompt is what you ask.
credits is zero on submit. The task’s price is held from your balance, captured when it completes, and released if it fails. See Credits and limits.
Chat engines such as
GEMINI read payload.prompt. GOOGLE, AIMODE, the Naver engines and GOOGLE_SERP read payload.query. Each falls back to the other field, so either one works. See Which payload field is read.3. Collect the result
- Webhook (recommended)
- Polling
Add Your endpoint receives
webhook.url when you submit. When the task finishes, querying.ai POSTs the result to that URL, so you never poll.{ task, credits, response }. Every delivery is signed with a key derived from your API key; verify the signature before you trust the body. See Webhooks for signing, retries and the payload.Next steps
Pick an engine
Every
taskType, what it returns, and what it costs.Batches and grids
Submit up to 500 tasks per request, or 10,000 as one batch.
Webhooks
Payloads, signature verification and retries.
Credits and limits
Prices, concurrency and daily caps.