List batches
curl --request GET \
--url https://api.zerogpu.ai/v1/batches \
--header 'x-api-key: <api-key>' \
--header 'x-project-id: <api-key>'import requests
url = "https://api.zerogpu.ai/v1/batches"
headers = {
"x-api-key": "<api-key>",
"x-project-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-project-id': '<api-key>'}
};
fetch('https://api.zerogpu.ai/v1/batches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));falsepackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zerogpu.ai/v1/batches"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-project-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.zerogpu.ai/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-project-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "<string>",
"object": "batch",
"endpoint": "<string>",
"status": "validating",
"input_file_id": "<string>",
"output_file_id": "<string>",
"error_file_id": "<string>",
"completion_window": "<string>",
"created_at": 123,
"expires_at": 123,
"request_counts": {
"total": 123,
"completed": 123,
"failed": 123
},
"metadata": {}
}
],
"first_id": "<string>",
"last_id": "<string>",
"has_more": true
}Batch API
List batches
Interactive playground for GET /v1/batches.
GET
/
v1
/
batches
List batches
curl --request GET \
--url https://api.zerogpu.ai/v1/batches \
--header 'x-api-key: <api-key>' \
--header 'x-project-id: <api-key>'import requests
url = "https://api.zerogpu.ai/v1/batches"
headers = {
"x-api-key": "<api-key>",
"x-project-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-project-id': '<api-key>'}
};
fetch('https://api.zerogpu.ai/v1/batches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));falsepackage main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zerogpu.ai/v1/batches"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-project-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.zerogpu.ai/v1/batches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-project-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "<string>",
"object": "batch",
"endpoint": "<string>",
"status": "validating",
"input_file_id": "<string>",
"output_file_id": "<string>",
"error_file_id": "<string>",
"completion_window": "<string>",
"created_at": 123,
"expires_at": 123,
"request_counts": {
"total": 123,
"completed": 123,
"failed": 123
},
"metadata": {}
}
],
"first_id": "<string>",
"last_id": "<string>",
"has_more": true
}List batch jobs in your project. Use
after with last_id from a previous page to paginate.
Full reference: Batches API.Query Parameters
Required range:
1 <= x <= 100Cursor: last_id from the previous page
Response
Batch list
Available options:
list Hide child attributes
Hide child attributes
Available options:
batch Available options:
validating, in_progress, finalizing, completed, failed, expired, cancelling, cancelled ⌘I

