List files
curl --request GET \
--url https://api.perceptron.inc/v1/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.perceptron.inc/v1/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.perceptron.inc/v1/files', 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.perceptron.inc/v1/files",
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.perceptron.inc/v1/files"
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.perceptron.inc/v1/files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perceptron.inc/v1/files")
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{
"data": [
{
"bytes": 123,
"created_at": 123,
"filename": "<string>",
"id": "<string>",
"object": "<string>",
"purpose": "vision"
}
],
"first_id": "<string>",
"has_more": true,
"last_id": "<string>",
"object": "<string>"
}{
"error": {
"code": null,
"message": "'limit' must be between 1 and 10000 (got 0)",
"param": null,
"type": "invalid_request_error"
}
}{
"error": {
"code": null,
"message": "Invalid API key",
"param": null,
"type": "authentication_error"
}
}{
"error": {
"code": null,
"message": "The server had an error while processing your request.",
"param": null,
"type": "server_error"
}
}List Files
Returns a paginated list of files belonging to the caller’s organization.
Cursor pagination via after; defaults match OpenAI’s /v1/files.
GET
/
v1
/
files
List files
curl --request GET \
--url https://api.perceptron.inc/v1/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.perceptron.inc/v1/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.perceptron.inc/v1/files', 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.perceptron.inc/v1/files",
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.perceptron.inc/v1/files"
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.perceptron.inc/v1/files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.perceptron.inc/v1/files")
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{
"data": [
{
"bytes": 123,
"created_at": 123,
"filename": "<string>",
"id": "<string>",
"object": "<string>",
"purpose": "vision"
}
],
"first_id": "<string>",
"has_more": true,
"last_id": "<string>",
"object": "<string>"
}{
"error": {
"code": null,
"message": "'limit' must be between 1 and 10000 (got 0)",
"param": null,
"type": "invalid_request_error"
}
}{
"error": {
"code": null,
"message": "Invalid API key",
"param": null,
"type": "authentication_error"
}
}{
"error": {
"code": null,
"message": "The server had an error while processing your request.",
"param": null,
"type": "server_error"
}
}List your organization’s files. Supports
purpose filtering and cursor pagination — pass the previous response’s last_id as the after parameter to fetch the next page. Compatible with OpenAI’s List files endpoint.
Rate limit: 100 requests/min.Authorizations
Bearer token authentication using your Perceptron API key
Query Parameters
Cursor for pagination — the id of the last file from the previous page.
Maximum number of objects to return (1-10000, default 10000).
Required range:
x >= 0Sort order by created_at.
Available options:
asc, desc Filter files by purpose.
Available options:
vision, user_data Example:
"vision"
Response
Page of files.