curl --request GET \
--url https://api.infery.ai/v1/files/{fileId} \
--header 'Authorization: <api-key>'import requests
url = "https://api.infery.ai/v1/files/{fileId}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.infery.ai/v1/files/{fileId}', 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.infery.ai/v1/files/{fileId}",
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: <api-key>"
],
]);
$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.infery.ai/v1/files/{fileId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.infery.ai/v1/files/{fileId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.infery.ai/v1/files/{fileId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "file_1hR9xTPZqK4mVLc2nJ7fY5wB",
"object": "file",
"bytes": 245192,
"created_at": 1713204900,
"filename": "report.pdf",
"purpose": "assistants",
"status": "processed"
}{
"error": {
"message": "Model not found",
"type": "invalid_request_error",
"code": "model_not_found",
"param": "model",
"job_id": "job_1hR9xTPZqK4mVLc2nJ7fY5wB"
}
}{
"error": {
"message": "Model not found",
"type": "invalid_request_error",
"code": "model_not_found",
"param": "model",
"job_id": "job_1hR9xTPZqK4mVLc2nJ7fY5wB"
}
}Retrieve file metadata
GET /v1/files/ — fetch metadata for a single file.
curl --request GET \
--url https://api.infery.ai/v1/files/{fileId} \
--header 'Authorization: <api-key>'import requests
url = "https://api.infery.ai/v1/files/{fileId}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.infery.ai/v1/files/{fileId}', 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.infery.ai/v1/files/{fileId}",
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: <api-key>"
],
]);
$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.infery.ai/v1/files/{fileId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.infery.ai/v1/files/{fileId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.infery.ai/v1/files/{fileId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "file_1hR9xTPZqK4mVLc2nJ7fY5wB",
"object": "file",
"bytes": 245192,
"created_at": 1713204900,
"filename": "report.pdf",
"purpose": "assistants",
"status": "processed"
}{
"error": {
"message": "Model not found",
"type": "invalid_request_error",
"code": "model_not_found",
"param": "model",
"job_id": "job_1hR9xTPZqK4mVLc2nJ7fY5wB"
}
}{
"error": {
"message": "Model not found",
"type": "invalid_request_error",
"code": "model_not_found",
"param": "model",
"job_id": "job_1hR9xTPZqK4mVLc2nJ7fY5wB"
}
}curl https://api.infery.ai/v1/files/file_abc123... \
-H "Authorization: Bearer $INFERY_API_KEY"
GET /v1/files/{fileId}/content.
Workspace-scoped: cross-workspace lookup returns 404 (we don’t leak existence).Authorizations
API key in format: Bearer inf_***
Path Parameters
The id returned by POST /v1/files, file_-prefixed. Not a UUID — passing a bare UUID will not resolve.
Response
File metadata
File handle, file_ followed by a base62 id. Use it on every other /v1/files route.
"file_1hR9xTPZqK4mVLc2nJ7fY5wB"
Always file.
"file"
Stored size in bytes. Counts against the workspace storage quota.
245192
Unix timestamp, in seconds, of when the file was stored.
1713204900
Sanitized basename. Any directory component of the uploaded name is stripped.
"report.pdf"
What the file is for. pipeline_artifact and media_artifact are stamped on files our own workflow and media-job workers produce; they appear in listings even though a caller rarely uploads with them.
assistants, vision, user_data, batch, pipeline_artifact, media_artifact "assistants"
Always processed — a constant kept for OpenAI parity. There is no asynchronous post-upload processing, so this never reports anything else and is not worth branching on.
"processed"