List batch
curl --request GET \
--url https://api.novita.ai/openai/v1/batches \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.novita.ai/openai/v1/batches"
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'}
};
fetch('https://api.novita.ai/openai/v1/batches', 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.novita.ai/openai/v1/batches",
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: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.novita.ai/openai/v1/batches"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.novita.ai/openai/v1/batches")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/openai/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"object": "<string>",
"endpoint": "<string>",
"input_file_id": "<string>",
"output_file_id": "<string>",
"error_file_id": "<string>",
"completion_window": "<string>",
"in_progress_at": {},
"expires_at": {},
"finalizing_at": {},
"completed_at": {},
"failed_at": {},
"expired_at": {},
"cancelling_at": {},
"cancelled_at": {},
"status": "<string>",
"errors": "<string>",
"version": 123,
"created_at": "<string>",
"updated_at": {},
"created_by": "<string>",
"created_by_key_id": "<string>",
"remark": "<string>",
"total": 123,
"completed": 123,
"failed": 123,
"metadata": {},
"request_counts": {
"total": 123,
"completed": 123,
"failed": 123
}
}
],
"first_id": "<string>",
"has_more": true,
"last_id": "<string>",
"object": "<string>"
}Batch
List batch
GET
/
openai
/
v1
/
batches
List batch
curl --request GET \
--url https://api.novita.ai/openai/v1/batches \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.novita.ai/openai/v1/batches"
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'}
};
fetch('https://api.novita.ai/openai/v1/batches', 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.novita.ai/openai/v1/batches",
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: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.novita.ai/openai/v1/batches"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.novita.ai/openai/v1/batches")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.novita.ai/openai/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"object": "<string>",
"endpoint": "<string>",
"input_file_id": "<string>",
"output_file_id": "<string>",
"error_file_id": "<string>",
"completion_window": "<string>",
"in_progress_at": {},
"expires_at": {},
"finalizing_at": {},
"completed_at": {},
"failed_at": {},
"expired_at": {},
"cancelling_at": {},
"cancelled_at": {},
"status": "<string>",
"errors": "<string>",
"version": 123,
"created_at": "<string>",
"updated_at": {},
"created_by": "<string>",
"created_by_key_id": "<string>",
"remark": "<string>",
"total": 123,
"completed": 123,
"failed": 123,
"metadata": {},
"request_counts": {
"total": 123,
"completed": 123,
"failed": 123
}
}
],
"first_id": "<string>",
"has_more": true,
"last_id": "<string>",
"object": "<string>"
}Displays a list of all available batch jobs.
Request Headers
string
obrigatório
Enum:
application/jsonstring
obrigatório
Bearer authentication format, for example: Bearer {{API Key}}.
Response
object[]
obrigatório
An array of batch job objects.
Mostrar Batch Object Properties
Mostrar Batch Object Properties
string
obrigatório
A unique identifier for the batch job.
string
obrigatório
The object type, which is always
batch.string
obrigatório
The API endpoint that the batch job is using for processing requests.
string
obrigatório
The ID of the input file containing the batch requests.
string
obrigatório
The ID of the output file containing the batch results. Empty until the batch is completed.
string
obrigatório
The ID of the error file containing any errors that occurred during batch processing. Empty until errors occur.
string
obrigatório
The time window for batch completion. Currently fixed at
48h.string | null
The timestamp when the batch started processing. Null if not yet started.
string | null
The timestamp when the batch will expire. Null if not set.
string | null
The timestamp when the batch started finalizing. Null if not yet finalizing.
string | null
The timestamp when the batch was completed. Null if not yet completed.
string | null
The timestamp when the batch failed. Null if not failed.
string | null
The timestamp when the batch expired. Null if not expired.
string | null
The timestamp when the batch started cancelling. Null if not cancelling.
string | null
The timestamp when the batch was cancelled. Null if not cancelled.
string
obrigatório
The current status of the batch job.Available statuses:
VALIDATING- The input file is being validated before the batch can beginPROGRESS- Batch is in progressCOMPLETED- Batch processing completed successfullyFAILED- Batch processing failedEXPIRED- Batch exceeded deadlineCANCELLING- Batch is being cancelledCANCELLED- Batch was cancelled
string
Error messages if any errors occurred during batch processing.
integer
obrigatório
The version number of the batch job.
string
obrigatório
The timestamp when the batch job was created.
string | null
The timestamp when the batch job was last updated. Null if never updated.
string
obrigatório
The unique identifier of the user who created the batch job.
string
obrigatório
The API key ID used to create the batch job.
string
Optional remark or note for the batch job.
integer
obrigatório
The total number of requests in the batch.
integer
obrigatório
The number of completed requests in the batch.
integer
obrigatório
The number of failed requests in the batch.
object | null
Additional metadata associated with the batch job. Null if no metadata is provided.
string
obrigatório
The ID of the first batch in the list.
boolean
obrigatório
Indicates whether there are more batches available beyond this list.
string
obrigatório
The ID of the last batch in the list.
string
obrigatório
The object type, which is always
list.Última modificação em 10 de agosto de 2026
⌘I