# Retrieve file content - Documentation

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown is available with `Accept: text/markdown` and `.md` URL variants.

Source: /docs/api-reference/model-apis-llm-retrieve-file-content

# Retrieve file content

GET

/

openai

/

v1

/

files

/

{file_id}

/

content

Try it

Retrieve file content

cURL

```
curl --request GET \
--url https://api.novita.ai/openai/v1/files/{file_id}/content \
--header 'Authorization: &#x3C;authorization>' \
--header 'Content-Type: &#x3C;content-type>'
```

Retrieves the content of a specific file using its file ID. This is commonly used to download batch output files or error files.

##

[​](#request-headers)

Request Headers

[​](#param-content-type)

Content-Type

string

required

Enum: `application/json`

[​](#param-authorization)

Authorization

string

required

Bearer authentication format, for example: Bearer {{API Key}}.

##

[​](#path-parameters)

Path Parameters

[​](#param-file-id)

file_id

string

required

The unique identifier of the file to retrieve content for.

##

[​](#response)

Response

The response returns the raw file content. For batch output files, this will be in JSONL format where each line contains a batch request result.
Example Response
For batch output files, each line contains a response like this:

```
{
"custom_id": "request-2589",
"error": null,
"id": "batch_req_task_d2c",
"response": {
"body": {
"id": "29e1432c-edfb-44a4-b531-c23c600abfae",
"object": "chat.completion",
"created": 1754902266,
"model": "deepseek-test",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! 👋 How can I assist you today? 😊"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 5,
"completion_tokens": 13,
"total_tokens": 18
}
},
"request_id": "request-2589",
"status_code": 200
}
}
```

Last modified on August 12, 2025
