Create tasks in bulk
curl --request POST \
--url https://api.querying.ai/v1/async/task/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"taskType": "GEMINI",
"idempotencyKey": "job-42:p1:gemini",
"payload": {
"prompt": "best wireless earbuds 2026"
}
},
{
"taskType": "PERPLEXITY",
"idempotencyKey": "job-42:p1:perplexity",
"payload": {
"prompt": "best wireless earbuds 2026"
}
},
{
"taskType": "GOOGLE",
"idempotencyKey": "job-42:p1:google",
"payload": {
"query": "best wireless earbuds 2026"
}
}
]
'import requests
url = "https://api.querying.ai/v1/async/task/batch"
payload = [
{
"taskType": "GEMINI",
"idempotencyKey": "job-42:p1:gemini",
"payload": { "prompt": "best wireless earbuds 2026" }
},
{
"taskType": "PERPLEXITY",
"idempotencyKey": "job-42:p1:perplexity",
"payload": { "prompt": "best wireless earbuds 2026" }
},
{
"taskType": "GOOGLE",
"idempotencyKey": "job-42:p1:google",
"payload": { "query": "best wireless earbuds 2026" }
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
taskType: 'GEMINI',
idempotencyKey: 'job-42:p1:gemini',
payload: {prompt: 'best wireless earbuds 2026'}
},
{
taskType: 'PERPLEXITY',
idempotencyKey: 'job-42:p1:perplexity',
payload: {prompt: 'best wireless earbuds 2026'}
},
{
taskType: 'GOOGLE',
idempotencyKey: 'job-42:p1:google',
payload: {query: 'best wireless earbuds 2026'}
}
])
};
fetch('https://api.querying.ai/v1/async/task/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.querying.ai/v1/async/task/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'taskType' => 'GEMINI',
'idempotencyKey' => 'job-42:p1:gemini',
'payload' => [
'prompt' => 'best wireless earbuds 2026'
]
],
[
'taskType' => 'PERPLEXITY',
'idempotencyKey' => 'job-42:p1:perplexity',
'payload' => [
'prompt' => 'best wireless earbuds 2026'
]
],
[
'taskType' => 'GOOGLE',
'idempotencyKey' => 'job-42:p1:google',
'payload' => [
'query' => 'best wireless earbuds 2026'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.querying.ai/v1/async/task/batch"
payload := strings.NewReader("[\n {\n \"taskType\": \"GEMINI\",\n \"idempotencyKey\": \"job-42:p1:gemini\",\n \"payload\": {\n \"prompt\": \"best wireless earbuds 2026\"\n }\n },\n {\n \"taskType\": \"PERPLEXITY\",\n \"idempotencyKey\": \"job-42:p1:perplexity\",\n \"payload\": {\n \"prompt\": \"best wireless earbuds 2026\"\n }\n },\n {\n \"taskType\": \"GOOGLE\",\n \"idempotencyKey\": \"job-42:p1:google\",\n \"payload\": {\n \"query\": \"best wireless earbuds 2026\"\n }\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.querying.ai/v1/async/task/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"taskType\": \"GEMINI\",\n \"idempotencyKey\": \"job-42:p1:gemini\",\n \"payload\": {\n \"prompt\": \"best wireless earbuds 2026\"\n }\n },\n {\n \"taskType\": \"PERPLEXITY\",\n \"idempotencyKey\": \"job-42:p1:perplexity\",\n \"payload\": {\n \"prompt\": \"best wireless earbuds 2026\"\n }\n },\n {\n \"taskType\": \"GOOGLE\",\n \"idempotencyKey\": \"job-42:p1:google\",\n \"payload\": {\n \"query\": \"best wireless earbuds 2026\"\n }\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.querying.ai/v1/async/task/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"taskType\": \"GEMINI\",\n \"idempotencyKey\": \"job-42:p1:gemini\",\n \"payload\": {\n \"prompt\": \"best wireless earbuds 2026\"\n }\n },\n {\n \"taskType\": \"PERPLEXITY\",\n \"idempotencyKey\": \"job-42:p1:perplexity\",\n \"payload\": {\n \"prompt\": \"best wireless earbuds 2026\"\n }\n },\n {\n \"taskType\": \"GOOGLE\",\n \"idempotencyKey\": \"job-42:p1:google\",\n \"payload\": {\n \"query\": \"best wireless earbuds 2026\"\n }\n }\n]"
response = http.request(request)
puts response.read_body{
"success": true,
"summary": {
"total": 3,
"succeeded": 2,
"failed": 1
},
"results": [
{
"success": true,
"index": 0,
"task": {
"id": "8f2c1e40-0000-0000-0000-000000000000",
"taskType": "GEMINI",
"status": "QUEUED",
"priority": 1,
"createdAt": "2026-07-09T04:12:00.000Z",
"idempotencyKey": "job-42:p1:gemini"
},
"credits": {
"creditsToCharge": 0,
"creditsCharged": 0
}
},
{
"success": false,
"index": 1,
"error": {
"code": "REGION_UNAVAILABLE",
"message": "cannot serve region 'DE': no live IPs provisioned. Check GET /capacity.",
"timestamp": "2026-07-09T04:12:00.000Z"
}
},
{
"success": true,
"index": 2,
"task": {
"id": "1b7d9c22-0000-0000-0000-000000000000",
"taskType": "GOOGLE",
"status": "QUEUED",
"priority": 1,
"createdAt": "2026-07-09T04:12:00.000Z",
"idempotencyKey": "job-42:p1:google"
},
"credits": {
"creditsToCharge": 0,
"creditsCharged": 0
}
}
]
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"details": [
{
"field": "",
"message": "Too small: expected array to have >=1 items"
}
],
"timestamp": "2026-07-09T04:12:00.000Z"
}
}{
"success": false,
"error": {
"code": "MISSING_API_KEY",
"message": "Missing or invalid API key",
"timestamp": "2026-07-09T04:12:00.000Z"
}
}{
"success": false,
"error": {
"code": "PAYLOAD_TOO_LARGE",
"message": "batch body exceeds 8388608 bytes",
"timestamp": "2026-07-09T04:12:00.000Z"
}
}Tasks
Create tasks in bulk
Queue up to 500 tasks in one request, mixing engines freely.
POST
/
v1
/
async
/
task
/
batch
Create tasks in bulk
curl --request POST \
--url https://api.querying.ai/v1/async/task/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"taskType": "GEMINI",
"idempotencyKey": "job-42:p1:gemini",
"payload": {
"prompt": "best wireless earbuds 2026"
}
},
{
"taskType": "PERPLEXITY",
"idempotencyKey": "job-42:p1:perplexity",
"payload": {
"prompt": "best wireless earbuds 2026"
}
},
{
"taskType": "GOOGLE",
"idempotencyKey": "job-42:p1:google",
"payload": {
"query": "best wireless earbuds 2026"
}
}
]
'import requests
url = "https://api.querying.ai/v1/async/task/batch"
payload = [
{
"taskType": "GEMINI",
"idempotencyKey": "job-42:p1:gemini",
"payload": { "prompt": "best wireless earbuds 2026" }
},
{
"taskType": "PERPLEXITY",
"idempotencyKey": "job-42:p1:perplexity",
"payload": { "prompt": "best wireless earbuds 2026" }
},
{
"taskType": "GOOGLE",
"idempotencyKey": "job-42:p1:google",
"payload": { "query": "best wireless earbuds 2026" }
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
taskType: 'GEMINI',
idempotencyKey: 'job-42:p1:gemini',
payload: {prompt: 'best wireless earbuds 2026'}
},
{
taskType: 'PERPLEXITY',
idempotencyKey: 'job-42:p1:perplexity',
payload: {prompt: 'best wireless earbuds 2026'}
},
{
taskType: 'GOOGLE',
idempotencyKey: 'job-42:p1:google',
payload: {query: 'best wireless earbuds 2026'}
}
])
};
fetch('https://api.querying.ai/v1/async/task/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.querying.ai/v1/async/task/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'taskType' => 'GEMINI',
'idempotencyKey' => 'job-42:p1:gemini',
'payload' => [
'prompt' => 'best wireless earbuds 2026'
]
],
[
'taskType' => 'PERPLEXITY',
'idempotencyKey' => 'job-42:p1:perplexity',
'payload' => [
'prompt' => 'best wireless earbuds 2026'
]
],
[
'taskType' => 'GOOGLE',
'idempotencyKey' => 'job-42:p1:google',
'payload' => [
'query' => 'best wireless earbuds 2026'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.querying.ai/v1/async/task/batch"
payload := strings.NewReader("[\n {\n \"taskType\": \"GEMINI\",\n \"idempotencyKey\": \"job-42:p1:gemini\",\n \"payload\": {\n \"prompt\": \"best wireless earbuds 2026\"\n }\n },\n {\n \"taskType\": \"PERPLEXITY\",\n \"idempotencyKey\": \"job-42:p1:perplexity\",\n \"payload\": {\n \"prompt\": \"best wireless earbuds 2026\"\n }\n },\n {\n \"taskType\": \"GOOGLE\",\n \"idempotencyKey\": \"job-42:p1:google\",\n \"payload\": {\n \"query\": \"best wireless earbuds 2026\"\n }\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.querying.ai/v1/async/task/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"taskType\": \"GEMINI\",\n \"idempotencyKey\": \"job-42:p1:gemini\",\n \"payload\": {\n \"prompt\": \"best wireless earbuds 2026\"\n }\n },\n {\n \"taskType\": \"PERPLEXITY\",\n \"idempotencyKey\": \"job-42:p1:perplexity\",\n \"payload\": {\n \"prompt\": \"best wireless earbuds 2026\"\n }\n },\n {\n \"taskType\": \"GOOGLE\",\n \"idempotencyKey\": \"job-42:p1:google\",\n \"payload\": {\n \"query\": \"best wireless earbuds 2026\"\n }\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.querying.ai/v1/async/task/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"taskType\": \"GEMINI\",\n \"idempotencyKey\": \"job-42:p1:gemini\",\n \"payload\": {\n \"prompt\": \"best wireless earbuds 2026\"\n }\n },\n {\n \"taskType\": \"PERPLEXITY\",\n \"idempotencyKey\": \"job-42:p1:perplexity\",\n \"payload\": {\n \"prompt\": \"best wireless earbuds 2026\"\n }\n },\n {\n \"taskType\": \"GOOGLE\",\n \"idempotencyKey\": \"job-42:p1:google\",\n \"payload\": {\n \"query\": \"best wireless earbuds 2026\"\n }\n }\n]"
response = http.request(request)
puts response.read_body{
"success": true,
"summary": {
"total": 3,
"succeeded": 2,
"failed": 1
},
"results": [
{
"success": true,
"index": 0,
"task": {
"id": "8f2c1e40-0000-0000-0000-000000000000",
"taskType": "GEMINI",
"status": "QUEUED",
"priority": 1,
"createdAt": "2026-07-09T04:12:00.000Z",
"idempotencyKey": "job-42:p1:gemini"
},
"credits": {
"creditsToCharge": 0,
"creditsCharged": 0
}
},
{
"success": false,
"index": 1,
"error": {
"code": "REGION_UNAVAILABLE",
"message": "cannot serve region 'DE': no live IPs provisioned. Check GET /capacity.",
"timestamp": "2026-07-09T04:12:00.000Z"
}
},
{
"success": true,
"index": 2,
"task": {
"id": "1b7d9c22-0000-0000-0000-000000000000",
"taskType": "GOOGLE",
"status": "QUEUED",
"priority": 1,
"createdAt": "2026-07-09T04:12:00.000Z",
"idempotencyKey": "job-42:p1:google"
},
"credits": {
"creditsToCharge": 0,
"creditsCharged": 0
}
}
]
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"details": [
{
"field": "",
"message": "Too small: expected array to have >=1 items"
}
],
"timestamp": "2026-07-09T04:12:00.000Z"
}
}{
"success": false,
"error": {
"code": "MISSING_API_KEY",
"message": "Missing or invalid API key",
"timestamp": "2026-07-09T04:12:00.000Z"
}
}{
"success": false,
"error": {
"code": "PAYLOAD_TOO_LARGE",
"message": "batch body exceeds 8388608 bytes",
"timestamp": "2026-07-09T04:12:00.000Z"
}
}Authorizations
Your API key, sent as Authorization: Bearer <key>.
Body
application/json
Required array length:
1 - 500 elementsThe engine to query. NAVER is a deprecated alias for NAVER_AI_BRIEF.
Available options:
CHATGPT, PERPLEXITY, GEMINI, COPILOT, GROK, AIMODE, GOOGLE, CLAUDE, NAVER_AI_BRIEF, NAVER_AI_MODE, NAVER, DEEPSEEK, AMAZON At least one of prompt or query is required. LLM engines read prompt; Google-family and Naver engines read query; Amazon prefers prompt.
Show child attributes
Show child attributes
Optional. Deduplicates submissions. Omit for no deduplication. A duplicate is a 409 on this endpoint, but a success on the batch endpoint.
Queue ordering, higher wins. Values outside 1–10 are clamped, not rejected.
Required range:
1 <= x <= 10Optional. Omit to collect the result by polling instead.
Show child attributes
Show child attributes
⌘I