Get File
curl --request GET \
--url https://{gatewayBaseURL}/files/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-tfy-provider-name: <x-tfy-provider-name>'import requests
url = "https://{gatewayBaseURL}/files/{id}"
headers = {
"x-tfy-provider-name": "<x-tfy-provider-name>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-tfy-provider-name': '<x-tfy-provider-name>',
Authorization: 'Bearer <token>'
}
};
fetch('https://{gatewayBaseURL}/files/{id}', 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://{gatewayBaseURL}/files/{id}",
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>",
"x-tfy-provider-name: <x-tfy-provider-name>"
],
]);
$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://{gatewayBaseURL}/files/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-tfy-provider-name", "<x-tfy-provider-name>")
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://{gatewayBaseURL}/files/{id}")
.header("x-tfy-provider-name", "<x-tfy-provider-name>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{gatewayBaseURL}/files/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-tfy-provider-name"] = '<x-tfy-provider-name>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"created_at": 123,
"purpose": "<string>",
"bytes": 123,
"status": "<string>"
}Files
Get File
Get information about a specific file
GET
/
files
/
{id}
Get File
curl --request GET \
--url https://{gatewayBaseURL}/files/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-tfy-provider-name: <x-tfy-provider-name>'import requests
url = "https://{gatewayBaseURL}/files/{id}"
headers = {
"x-tfy-provider-name": "<x-tfy-provider-name>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-tfy-provider-name': '<x-tfy-provider-name>',
Authorization: 'Bearer <token>'
}
};
fetch('https://{gatewayBaseURL}/files/{id}', 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://{gatewayBaseURL}/files/{id}",
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>",
"x-tfy-provider-name: <x-tfy-provider-name>"
],
]);
$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://{gatewayBaseURL}/files/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-tfy-provider-name", "<x-tfy-provider-name>")
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://{gatewayBaseURL}/files/{id}")
.header("x-tfy-provider-name", "<x-tfy-provider-name>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{gatewayBaseURL}/files/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-tfy-provider-name"] = '<x-tfy-provider-name>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"created_at": 123,
"purpose": "<string>",
"bytes": 123,
"status": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Name of the provider
Optional metadata for the request
Vertex AI storage bucket name
Vertex AI region (e.g., europe-west4)
Provider-specific model identifier
Path Parameters
The ID of the file to retrieve
Response
File retrieved successfully.
Id of the uploaded file.
Type of the object, e.g., 'file'.
Timestamp of when the file was created.
The purpose of the file, e.g., 'batch'.
The size of the file in bytes.
The status of the file, e.g., 'processed'.
Was this page helpful?