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
必須
Enum:
application/jsonstring
必須
Bearer authentication format, for example: Bearer {{API Key}}.
Response
object[]
必須
An array of batch job objects.
表示 Batch Object Properties
表示 Batch Object Properties
string
必須
A unique identifier for the batch job.
string
必須
The object type, which is always
batch.string
必須
The API endpoint that the batch job is using for processing requests.
string
必須
The ID of the input file containing the batch requests.
string
必須
The ID of the output file containing the batch results. Empty until the batch is completed.
string
必須
The ID of the error file containing any errors that occurred during batch processing. Empty until errors occur.
string
必須
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
必須
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
必須
The version number of the batch job.
string
必須
The timestamp when the batch job was created.
string | null
The timestamp when the batch job was last updated. Null if never updated.
string
必須
The unique identifier of the user who created the batch job.
string
必須
The API key ID used to create the batch job.
string
Optional remark or note for the batch job.
integer
必須
The total number of requests in the batch.
integer
必須
The number of completed requests in the batch.
integer
必須
The number of failed requests in the batch.
object | null
Additional metadata associated with the batch job. Null if no metadata is provided.
string
必須
The ID of the first batch in the list.
boolean
必須
Indicates whether there are more batches available beyond this list.
string
必須
The ID of the last batch in the list.
string
必須
The object type, which is always
list.最終更新日 2026年8月10日
⌘I