List files
curl --request GET \
--url https://api.zerogpu.ai/v1/files \
--header 'x-api-key: <api-key>' \
--header 'x-project-id: <api-key>'import requests
url = "https://api.zerogpu.ai/v1/files"
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/files', 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/files"
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/files")
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": "file",
"bytes": 123,
"created_at": 123,
"filename": "<string>",
"purpose": "batch",
"status": "uploaded",
"status_details": "<string>",
"expires_at": 123,
"is_error": true
}
],
"first_id": "<string>",
"last_id": "<string>",
"has_more": true
}Batch API
List files
Interactive playground for GET /v1/files.
GET
/
v1
/
files
List files
curl --request GET \
--url https://api.zerogpu.ai/v1/files \
--header 'x-api-key: <api-key>' \
--header 'x-project-id: <api-key>'import requests
url = "https://api.zerogpu.ai/v1/files"
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/files', 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/files"
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/files")
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": "file",
"bytes": 123,
"created_at": 123,
"filename": "<string>",
"purpose": "batch",
"status": "uploaded",
"status_details": "<string>",
"expires_at": 123,
"is_error": true
}
],
"first_id": "<string>",
"last_id": "<string>",
"has_more": true
}List files for your project. Filter with
purpose=batch (uploads) or purpose=batch_output (batch results; check is_error on each item for error files).
Use last_id from the response as after on the next request to page. Full reference: Files API.Query Parameters
Filter by purpose. batch_output includes success and error output files (is_error on each object).
Available options:
batch, batch_output Available options:
desc, asc Cursor: file id from the previous page (or last_id from the prior response).
Required range:
1 <= x <= 10000Response
File list
Available options:
list Hide child attributes
Hide child attributes
Prefixed with file-.
Available options:
file Uploads use batch; batch results use batch_output.
Available options:
batch, batch_output Available options:
uploaded, processed, error ZeroGPU extension. true on batch error output files only.

