I see two different methods in the docs for working with files using GPT-5:
1- Using the File Search tool with a vector store: https://platform.openai.com/docs/guides/tools-file-search. For example:
from openai import OpenAI
client = OpenAI()
response = client.responses.create(
model="gpt-4.1",
input="What is deep research by OpenAI?",
tools=[{
"type": "file_search",
"vector_store_ids": ["<vector_store_id>"]
}]
)
print(response)
2- Using File Inputs: https://platform.openai.com/docs/guides/pdf-files. For example:
from openai import OpenAI
client = OpenAI()
file = client.files.create(
file=open("draconomicon.pdf", "rb"),
purpose="user_data"
)
response = client.responses.create(
model="gpt-5",
input=[
{
"role": "user",
"content": [
{
"type": "input_file",
"file_id": file.id,
},
{
"type": "input_text",
"text": "What is the first dragon in the book?",
},
]
}
]
)
print(response.output_text)
My question is: what is the logical difference between approach #2 and approach #1?
More specifically:
-
Does approach #2 not use a vector store? Is it more like including the entire file directly in the context? What makes me think this is that approach #2 has a total upload limit of 32 MB and accepts only PDFs, whereas approach #1 uses a vector store and therefore doesn’t have that concern.
-
On the other hand, the first line on the page for approach #2 says:
OpenAI models with vision capabilities can also accept PDF files as input.
So is the reason approach #2 differs from approach #1 simply that it relies on vision capabilities, and therefore has the 32 MB limit?

