OpenAI Files API: file inputs, search, and support knowledge

Kurnia Kharisma Agung Samiadjie
Written by

Kurnia Kharisma Agung Samiadjie

Katelin Teen
Reviewed by

Katelin Teen

Last edited September 8, 2026

Expert Verified
Two people adjusting illustrated gears marked with the letter e

What the OpenAI Files API is for

The Files reference covers files uploaded to OpenAI and the file IDs returned by those uploads. A file ID can be used in different workflows. The two choices that matter most for support knowledge are direct file inputs and retrieval.

NeedSuitable OpenAI pathWhat still belongs to your application
Answer one bounded question about one documentSend it as an input_file in a Responses API requestDecide whether the document is approved and whether its answer is safe to send.
Search across a maintained set of policies and help articlesPut files in a vector store and use File SearchControl source selection, freshness, permissions, evaluation, and the final action.
Analyze a spreadsheet or a document with chartsCheck the input-file processing rules before choosing a formatVerify that the model received the details needed for the decision.

This distinction prevents a common design mistake: treating an upload endpoint as a complete knowledge system. The Files API stores a file. It does not know whether a refund policy is superseded, whether a customer has been verified, or whether a refund actually completed.

Choose direct inputs for a bounded file question

With file inputs, a Responses API request can include Base64 data, a file ID returned by the Files API, or an external file URL. This is useful when the question is specific: “Summarize this contract,” “extract the return deadline from this PDF,” or “compare these two approved policy drafts.”

For files that will be passed as model inputs, OpenAI documents user_data as the appropriate upload purpose. A request can contain more than one file, but the current input-file limits are 50 MB per file and 50 MB in total. Treat those as product constraints to recheck before you ship, not as a reason to split confidential material into smaller unreviewed uploads.

Format changes what the model sees:

  • For PDFs sent to a vision-capable model, OpenAI processes extracted text and page images.
  • For non-PDF documents, it extracts text only. Embedded diagrams and charts are not carried into context the same way.
  • For spreadsheet inputs, OpenAI applies a spreadsheet-specific augmentation flow instead of simply placing every cell in context.

If a policy exception is in a scanned table or a chart, test that exact artifact. Do not assume a successful upload means the model saw the relevant value.

Use vector stores when knowledge must be searched repeatedly

For reusable knowledge, OpenAI's retrieval guide describes vector stores. When you add a file, OpenAI chunks, embeds, and indexes it. File Search can then retrieve relevant passages by semantic and keyword search when it is made available to a Responses API model.

The basic lifecycle is simple:

  1. Create a vector store for a defined collection, such as approved support policies.
  2. Upload the approved file and add it to that store.
  3. Wait for the vector-store file to finish processing.
  4. Search with representative customer questions, or let a Responses API request use File Search.
  5. Inspect the passages and the final answer before you automate a reply.

OpenAI provides polling helpers such as uploadAndPoll and createAndPoll, because adding a vector-store file can take time. If you handle the status yourself, do not send a customer answer merely because the raw file upload completed.

The File Search guide also distinguishes retrieved citations from underlying search results. Decide what your support team needs to inspect: the source file, the retrieved passage, the answer, or all three. A support workflow with refunds or account changes usually needs more than a plausible answer.

Test knowledge quality, not just retrieval

Start with a small, versioned set of approved sources. Then build an evaluation set that includes:

  • Straightforward questions that should find the policy.
  • Questions that should trigger an exception or a handoff.
  • Questions based on older wording that must not override the current policy.
  • Questions that need customer-specific evidence the document cannot provide.

Record whether the right source appeared, whether the answer preserved the policy boundary, and whether the workflow routed uncertainty to a person. If you remove a file from a vector store, OpenAI notes that removal is eventually consistent: a search may still return its content briefly. Plan a transition and re-test rather than assuming a deletion is instant.

Control cost and retention deliberately

Vector-store cost is based on the total size of parsed chunks and their embeddings, not merely the source document's original file size. In the current retrieval pricing, the first 1 GB across vector stores is free and additional storage is listed at $0.10 per GB per day. Model usage and other tools can add separate costs.

That makes source hygiene an engineering and support task. Remove obsolete material on a deliberate schedule, but first verify that a replacement is processed and produces the intended result. Measure the full workflow with your actual documents and questions; a storage estimate alone does not reveal a poor answer, a missing handoff, or an unnecessary escalation.

Use eesel CLI to review support knowledge after a file changes

OpenAI's Files API is infrastructure for an application you build. eesel is a ready-to-work helpdesk teammate. The eesel CLI is another way to operate that teammate: from a terminal, a script, or a coding agent such as Claude Code, Codex, or Cursor. The teammate and workspace are the same as in the dashboard, so CLI changes appear there and dashboard changes appear in the CLI.

That is useful after a support lead revises a refund-policy PDF. The lead can ask a coding agent for an inspection report before any change: which sources are connected, whether their content is downloaded, what files were manually uploaded, and which instructions govern exceptions and human handoff. The coding agent reads JSON output; it should not connect accounts or change permissions while making that report.

Start with Node.js 18.17 or newer, sign in, and identify the intended teammate:

Bash
npx @eesel/cli login
npx @eesel/cli whoami
npx @eesel/cli agents

TARGET_EESEL_AGENT="paste-agent-id-or-name-here"

Use the explicit agent scope for every following command. It keeps a script or coding agent from acting on a saved default teammate by mistake:

Bash
npx @eesel/cli status --agent "$TARGET_EESEL_AGENT"
npx @eesel/cli integrations --agent "$TARGET_EESEL_AGENT"
npx @eesel/cli files ls --agent "$TARGET_EESEL_AGENT"
npx @eesel/cli instructions --agent "$TARGET_EESEL_AGENT"

After a human approves the policy file and its audience, preview the write before sending it. The CLI's --dry-run prints the server call without making it:

Bash
npx @eesel/cli files upload ./approved-refund-policy.pdf --agent "$TARGET_EESEL_AGENT" --dry-run
npx @eesel/cli files upload ./approved-refund-policy.pdf --agent "$TARGET_EESEL_AGENT"
npx @eesel/cli files ls --agent "$TARGET_EESEL_AGENT"

Then perform the approved upload, confirm the source is available, and use a new, named conversation for a redacted test. This chat is billed work; the inspection commands are free.

Bash
npx @eesel/cli new --name "refund-policy-file-check" --agent "$TARGET_EESEL_AGENT"
npx @eesel/cli chat "Using the approved refund policy, explain what evidence is required for a damaged item reported after the normal window. Do not promise a refund; state when a human must decide." --agent "$TARGET_EESEL_AGENT"

Review the answer against the approved policy, not just for fluent wording. Check that it asks for missing evidence, does not invent an exception, and gives an honest handoff. If the workflow creates a held action, inspect it with npx @eesel/cli approvals --agent "$TARGET_EESEL_AGENT". A reply is not proof that a refund, order update, or other external action happened; verify the final result in the connected system before telling the customer it did.

eesel Integrations page listing connected platforms, sources, and items added to a teammate.
eesel Integrations page listing connected platforms, sources, and items added to a teammate.

The Integrations view helps a support lead verify which sources are connected and added to the teammate before a controlled knowledge test.

When each approach fits

Choose the OpenAI Files API when you are building a custom application that needs to accept a document, pass it to a model, or create your own retrieval layer. You own the upload path, source authorization, vector-store design, evaluation, customer experience, and action verification.

Use eesel when your immediate job is to operate a helpdesk teammate that works with the knowledge sources and channels your support team already uses. Its CLI gives humans, scripts, and coding agents a careful way to inspect that same teammate and run an approved test from the terminal. It does not turn eesel into OpenAI's file storage or replace the checks your support process needs.

If you want to review support knowledge and policy behavior before customers rely on it, try eesel, then read the CLI guide.

Frequently asked questions

What is the OpenAI Files API?

The Files API stores uploaded files and returns file IDs. You can use those IDs as direct inputs to a Responses API request or associate files with a vector store for retrieval. The API stores and prepares files; your application still decides what may be searched, what answer to send, and what action to take.

Can OpenAI Files API read a PDF with charts or diagrams?

When a vision-capable model receives a PDF as an input file, OpenAI processes extracted text and page images. Non-PDF documents provide extracted text only, so embedded charts and diagrams are not preserved in the model context the same way. Confirm the result with the exact document and question you need to support.

What happens after I add a file to a vector store?

OpenAI chunks, embeds, and indexes the file. Adding a vector-store file can be asynchronous, so use the documented polling helpers or inspect its status before depending on it. Removing a file is eventually consistent, which means search can briefly return removed content.

How much does OpenAI vector-store storage cost?

Check OpenAI's current retrieval pricing before deployment. The documentation currently lists the first 1 GB across vector stores as free and storage beyond that at $0.10 per GB per day, based on parsed chunks and embeddings. Model and tool usage are separate costs.

Does File Search prove a support answer is correct?

No. Retrieval can surface a relevant passage, but it does not prove that the document is current, that the customer qualifies for an exception, or that a connected system completed an action. Test policy edge cases, require approval where needed, and verify the actual service result.

Where does eesel CLI fit with OpenAI files?

The eesel CLI operates an existing eesel teammate and its workspace, not OpenAI's Files API or vector stores. A support lead, script, or coding agent can use it to inspect the teammate's connected knowledge, upload an approved file, review instructions, and test a redacted support scenario using the same teammate shown in the dashboard.

Can Claude Code, Codex, or Cursor use eesel CLI?

Yes. The CLI prints JSON, so coding agents can perform a scoped review or setup task. Scope commands to the intended teammate, keep account connections and changes behind human approval, use --dry-run before a write, then inspect the resulting knowledge and customer-facing behavior.

Share this article

Kurnia Kharisma Agung Samiadjie

Article by

Kurnia Kharisma Agung Samiadjie

Kurnia is a software engineer and writer at eesel AI with two years of SEO experience, writing about AI tools, helpdesk software, and customer support. He pairs a developer's understanding of how these products are built with search-driven research into what actually ranks and resonates with the people searching for them.

Related Posts

All posts →
OpenAI logo connected to six outlined squares
Guides

OpenAI Embeddings API: how semantic search actually works

Learn how the OpenAI Embeddings API supports semantic search and retrieval, what a support knowledge workflow still needs, and how to test it before relying on results.

Rama Adi NugrahaRama Adi NugrahaOct 12, 2025
eesel Integrations page listing connected helpdesk and knowledge sources
Guides

OpenAI Vector Stores API: retrieval and support knowledge

Learn how OpenAI vector stores prepare files for retrieval, what to test before using support knowledge, and where eesel CLI fits in that work.

Kenneth PanganKenneth PanganOct 12, 2025
A practical guide to ServiceNow AI Search knowledge
Guides

A practical guide to ServiceNow AI Search knowledge

Struggling to get the most out of ServiceNow AI Search for your knowledge base? Our guide breaks down its key features, configuration steps, common pitfalls, and introduces a more flexible, self-serve alternative for unifying your company's knowledge.

Kenneth PanganKenneth PanganOct 17, 2025
A practical guide to AI documentation search
Guides

A practical guide to AI documentation search

Unlock the power of your company's knowledge. This guide explains how AI documentation search works, its key use cases, and what to look for in a platform to automate support and empower your team.

Stevia PutriStevia PutriOct 21, 2025
A person viewing connected user and assistant message threads
Guides

OpenAI Threads API: conversation state after Assistants

Learn why OpenAI conversation state now belongs in the Responses and Conversations APIs, what your application still owns, and how to test an eesel teammate safely.

Rama Adi NugrahaRama Adi NugrahaOct 12, 2025
A base network, curated examples, checklist, and refined network
Guides

OpenAI Fine-Tuning API: what to do as it winds down

Learn OpenAI's current fine-tuning status, how to decide between training and support configuration, and how to test a safer path before customer replies change.

Rama Adi NugrahaRama Adi NugrahaOct 12, 2025
A source handbag, a selected mask, and a blue edited handbag
Guides

OpenAI Image Edit API: a practical guide to safe image workflows

Learn what the OpenAI Image Edit API does, when to use the Image or Responses API, and how to test image-based support work without confusing an edit with a verified outcome.

Rama Adi NugrahaRama Adi NugrahaOct 12, 2025
One landscape illustration branching into three visual variations
Guides

OpenAI Image Variations API: what it does in 2026

Understand the legacy OpenAI Image Variations API, when current image edits are a better fit, and how to keep visual support content and teammate guidance under review.

Rama Adi NugrahaRama Adi NugrahaOct 12, 2025
A support agent beside a secured web chat interface
Guides

OpenAI ChatKit Sessions API: current setup and migration choices

Understand OpenAI ChatKit Sessions, client-secret handling, the Agent Builder transition, and when a ready-to-work eesel support teammate is a better fit than building a custom chat stack.

Rama Adi NugrahaRama Adi NugrahaOct 10, 2025

Ready to hire your AI teammate?

Set up in minutes. No credit card required.

Get started free