/v1/files/{file_id}/contentDownload a file
The raw file as application/jsonl. For a batch output file, each line is {"id", "custom_id", "response": {"status_code", "body"}, "error"}, where body is the provider-shaped response including its token usage. Lines carry no usage.cost; spend shows in your usage history.
Error-file lines have response: null and an error object.
Authentication: Bearer API key in the Authorization header
Path parameters
file_idstringrequiredThe file id.
Responses
200The file bytes.
401The key is missing, malformed, expired or revoked.
Response
errorobjecterror
messagestringWhat went wrong and how to fix it.
typestringFor example
invalid_request_error,authentication_error,permission_error,rate_limit_error,insufficient_quota,api_error.codestringThe stable error code.
paramstring | nullThe request field at fault, when there is one.
refusal_reasonenumPresent only on
code: refusal.
404No such resource for this key.
Response
errorobjecterror
messagestringWhat went wrong and how to fix it.
typestringFor example
invalid_request_error,authentication_error,permission_error,rate_limit_error,insufficient_quota,api_error.codestringThe stable error code.
paramstring | nullThe request field at fault, when there is one.
refusal_reasonenumPresent only on
code: refusal.
Request
curl https://api.experientiallabs.ai/v1/files/file_7b1d9e3a5c2f4086b4a1e9c7/content \
-H "Authorization: Bearer YOUR_API_KEY" \
--output results.jsonl
Response
{"id":"batch_9c2e4b7a1f0d3e6c5b8a2d4f_line_0","custom_id":"req-1","response":{"status_code":200,"body":{"id":"chatcmpl_a1b2","object":"chat.completion","model":"gpt-6-luna","choices":[{"index":0,"message":{"role":"assistant","content":"Hi! How can I help?"},"finish_reason":"stop"}],"usage":{"prompt_tokens":8,"completion_tokens":7,"total_tokens":15}}},"error":null}
https://api.experientiallabs.ai/v1/files/file_3f9a1c0e7b2d4a6f8e1c2b3d/content