Prompt Buddy logoPrompt Buddy

openai · OpenAI Platform Docs

File search | OpenAI API

Explains how to implement and manage the File Search tool within the OpenAI Assistants API to enable retrieval-augmented generation from uploaded documents.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

File search | OpenAI API

Explains how to implement and manage the File Search tool within the OpenAI Assistants API to enable retrieval-augmented generation from uploaded documents.

When To Use

Use when you need to implement a workflow that allows an AI assistant to query, search, and retrieve information from a collection of uploaded files.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/search-openai-api-workflow-guide.mdA guide explaining how to use the file search tool by uploading files to the File API and managing vector stores.Questions about a guide explaining how to use the file search tool by uploading files to the File API and managing vector stores.
examples/search-openai-api-openai-api-search-python-implementation.textA Python code example demonstrating how to use the OpenAI client to create and manage files for the file search tool.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the OpenAI client to create and manage files for the file search tool.
examples/search-openai-api-openai-api-filesearch-nodejs-create.textA Node.js code example demonstrating how to download a file from a URL and upload it to the OpenAI API for use with the file search tool.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to download a file from a URL and upload it to the OpenAI API for use with t...
examples/search-openai-api-openai-api-python-vectorstore-create.textA Python code snippet demonstrating how to create a new vector store using the OpenAI API client.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to create a new vector store using the OpenAI API client.
examples/search-openai-api-openai-api-search-vector-store-creation-nodejs.textA Node.js code example demonstrating how to create a new vector store using the OpenAI API.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to create a new vector store using the OpenAI API.
examples/search-openai-api-openai-api-vectorstore-files-create-python.textA Python code snippet demonstrating how to add a file to an existing vector store using the OpenAI API client.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to add a file to an existing vector store using the OpenAI API client.
examples/search-openai-api-openai-api-vector-stores-files-create-nodejs.textA Node.js code example demonstrating how to add a file to an existing vector store using the OpenAI API.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to add a file to an existing vector store using the OpenAI API.
examples/search-openai-api-openai-api-vectorstores-files-list-python.textA Python code snippet demonstrating how to list files within a specific vector store using the OpenAI API client.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to list files within a specific vector store using the OpenAI API client.
examples/search-openai-api-openai-api-vector-stores-files-list-nodejs.textA Node.js code example demonstrating how to list files within a specific vector store using the OpenAI API.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to list files within a specific vector store using the OpenAI API.
examples/search-openai-api-openai-api-filesearch-python-implementation.textA Python code example demonstrating how to use the file search tool with the OpenAI client to query a vector store.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to use the file search tool with the OpenAI client to query a vector store.
examples/search-openai-api-openai-api-filesearch-nodejs-implementation.textA Node.js code example demonstrating how to use the filesearch tool within an OpenAI API response request.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to use the filesearch tool within an OpenAI API response request.
examples/search-openai-api-openai-api-csharp-search-tool-implementation.textA C# code example demonstrating how to initialize an OpenAI client and add the file search tool to response creation options.Exact payloads, commands, or snippets shown in A C# code example demonstrating how to initialize an OpenAI client and add the file search tool to response creation...
examples/search-openai-api-openai-api-filesearch-call-response.textA text representation of an API response object containing a completed file search call with query and status details.Exact payloads, commands, or snippets shown in A text representation of an API response object containing a completed file search call with query and status details.
examples/search-openai-api-openai-api-filesearch-python-client-request.textA Python code snippet demonstrating how to create a response using the OpenAI API with the file search tool enabled.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to create a response using the OpenAI API with the file search tool enabled.
examples/search-openai-api-openai-api-filesearch-nodejs-response-creation.textA Node.js code example demonstrating how to create a response using the filesearch tool and a vector store ID.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to create a response using the filesearch tool and a vector store ID.
examples/search-openai-api-openai-api-filesearch-python-request.textA Python code snippet demonstrating how to create a response using the OpenAI API with the file search tool enabled.Exact payloads, commands, or snippets shown in A Python code snippet demonstrating how to create a response using the OpenAI API with the file search tool enabled.
examples/search-openai-api-openai-api-filesearch-nodejs-response-creation-2.textA Node.js code example demonstrating how to create a response using the filesearch tool and vector store IDs via the OpenAI API.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to create a response using the filesearch tool and vector store IDs via the...
examples/search-openai-api-openai-api-filesearch-python-response-creation.textA Python code example demonstrating how to create a response using the OpenAI API with the file search tool and vector store IDs.Exact payloads, commands, or snippets shown in A Python code example demonstrating how to create a response using the OpenAI API with the file search tool and vecto...
examples/search-openai-api-openai-api-filesearch-nodejs-response-creation-3.textA Node.js code example demonstrating how to create a response using the filesearch tool and vector store IDs via the OpenAI API.Exact payloads, commands, or snippets shown in A Node.js code example demonstrating how to create a response using the filesearch tool and vector store IDs via the...

What This Skill Covers

  • File search is a tool available in the Responses API. It enables models to retrieve information in a knowledge base of previously uploaded files through sema...
  • Main sections: How to use, Upload the file to the File API, Create a vector store, Add the file to the vector store, Check status.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.openai.com/api/docs/guides/tools-file-search