列出批次项目
分页获取批次的项目和结果。
GET
/
v1
/
batches
/
{id}
/
items
List batch items
curl --request GET \
--url https://api.querying.ai/v1/batches/{id}/items \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.querying.ai/v1/batches/{id}/items"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.querying.ai/v1/batches/{id}/items', 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/batches/{id}/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.querying.ai/v1/batches/{id}/items"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.querying.ai/v1/batches/{id}/items")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.querying.ai/v1/batches/{id}/items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"nextCursor": "99",
"items": [
{
"index": 0,
"customId": "shoes-chatgpt-us",
"taskType": "CHATGPT",
"status": "COMPLETED",
"taskId": "8f2c1e40-0000-0000-0000-000000000000",
"completedAt": "2026-10-09T09:01:02.000Z"
},
{
"index": 1,
"customId": "shoes-gemini-us",
"taskType": "GEMINI",
"status": "QUEUED",
"taskId": "1b7d9c22-0000-0000-0000-000000000000"
}
]
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "MISSING_API_KEY",
"message": "Missing or invalid API key",
"timestamp": "2026-07-09T04:12:00.000Z"
}
}{
"success": false,
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Batch not found",
"timestamp": "2026-10-09T09:00:00.000Z"
}
}授权
Your API key, sent as Authorization: Bearer <key>.
路径参数
The batch id returned by POST /v1/batches.
查询参数
nextCursor from the previous page.
Items per page: default 100, up to 1,000; with include=response default 20, up to 100.
必填范围:
1 <= x <= 1000可用选项:
pending, queued, processing, completed, failed, rejected 可用选项:
response ⌘I
List batch items
curl --request GET \
--url https://api.querying.ai/v1/batches/{id}/items \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.querying.ai/v1/batches/{id}/items"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.querying.ai/v1/batches/{id}/items', 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/batches/{id}/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.querying.ai/v1/batches/{id}/items"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.querying.ai/v1/batches/{id}/items")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.querying.ai/v1/batches/{id}/items")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"nextCursor": "99",
"items": [
{
"index": 0,
"customId": "shoes-chatgpt-us",
"taskType": "CHATGPT",
"status": "COMPLETED",
"taskId": "8f2c1e40-0000-0000-0000-000000000000",
"completedAt": "2026-10-09T09:01:02.000Z"
},
{
"index": 1,
"customId": "shoes-gemini-us",
"taskType": "GEMINI",
"status": "QUEUED",
"taskId": "1b7d9c22-0000-0000-0000-000000000000"
}
]
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"message": "<string>"
}
],
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "MISSING_API_KEY",
"message": "Missing or invalid API key",
"timestamp": "2026-07-09T04:12:00.000Z"
}
}{
"success": false,
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Batch not found",
"timestamp": "2026-10-09T09:00:00.000Z"
}
}