Download file content
https://api.respan.ai/api/files/{file_id}/content/Download file content. Batch output files are returned as JSONL.
Servers
https://api.respan.ai: Respan API Server
Authentication
RespanApiKey
Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.
HTTP scheme: bearer; format: Respan API key.
Authorization: Bearer $RESPAN_API_KEYPath parameters
file_id string RequiredExample:
"file-abc123"Query parameters
provider_id string Requiredopenai or parasail.Responses
200
File content.
application/octet-stream
$ string BodybinaryOpenAPI response schema
{
"type": "string",
"format": "binary"
}401
You haven’t added your own key for the provider in Settings › Providers, or the provider rejected it. Files and batches always run on your own key; Respan credits can’t cover them.
application/json
$ object Body
error object Required in parent
error.message string Required in parenterror.type string Required in parenterror.param any or null Optionalerror.code any or null OptionalOpenAPI response schema
{
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"message",
"type"
],
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
},
"param": {
"nullable": true
},
"code": {
"nullable": true
}
}
}
}
}Example
{
"error": {
"message": "Please add your OpenAI API key in Settings -> Providers. The Files and Batch endpoints always run on your own credentials. Respan credits cannot cover them, because a batch's usage is only known after it completes.",
"type": "upstream_provider_error",
"param": null,
"code": null
}
}403
The API key is missing, invalid or expired.
application/json
$ object Body
detail string Required in parentOpenAPI response schema
{
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
}Example
{
"detail": "Your API key is invalid or expired, please check your API key in the platform settings."
}404
Not Found
application/json
$ object Body
error string Optionaldetail string Optionalerror_class string Optionalid string OptionalOpenAPI response schema
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"detail": {
"type": "string"
},
"error_class": {
"type": "string"
},
"id": {
"type": "string"
}
},
"additionalProperties": true
}Example
{
"error": "Not found"
}OpenAPI source
The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.
OpenAPI operation
{
"summary": "Download file content",
"operationId": "retrieveFileContent",
"tags": [
"OpenAI Batch"
],
"description": "Download file content. Batch output files are returned as JSONL.",
"parameters": [
{
"name": "file_id",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "OpenAI file ID.",
"example": "file-abc123"
},
{
"name": "provider_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "Provider route with customer-owned credentials, for example `openai` or `parasail`."
}
],
"responses": {
"200": {
"description": "File content.",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"401": {
"description": "You haven't added your own key for the provider in Settings › Providers, or the provider rejected it. Files and batches always run on your own key; Respan credits can't cover them.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"required": [
"message",
"type"
],
"properties": {
"message": {
"type": "string"
},
"type": {
"type": "string"
},
"param": {
"nullable": true
},
"code": {
"nullable": true
}
}
}
}
},
"example": {
"error": {
"message": "Please add your OpenAI API key in Settings -> Providers. The Files and Batch endpoints always run on your own credentials. Respan credits cannot cover them, because a batch's usage is only known after it completes.",
"type": "upstream_provider_error",
"param": null,
"code": null
}
}
}
}
},
"403": {
"$ref": "#/components/responses/InvalidApiKey"
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"detail": {
"type": "string"
},
"error_class": {
"type": "string"
},
"id": {
"type": "string"
}
},
"additionalProperties": true
},
"example": {
"error": "Not found"
}
}
}
}
},
"security": [
{
"RespanApiKey": []
}
]
}OpenAPI path metadata
{}Referenced OpenAPI components
{
"responses": {
"InvalidApiKey": {
"description": "The API key is missing, invalid or expired.",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"detail"
],
"properties": {
"detail": {
"type": "string"
}
}
},
"example": {
"detail": "Your API key is invalid or expired, please check your API key in the platform settings."
}
}
}
}
},
"securitySchemes": {
"RespanApiKey": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "Respan API key",
"description": "Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.",
"x-fern-bearer": {
"name": "respanApiKey",
"env": "RESPAN_API_KEY"
}
}
}
}