{
  "run_id": "2026-09-21-r3-youcom",
  "round": 2,
  "tool": "youcom",
  "mode": "search",
  "tc_id": "TC1",
  "capability": "C1",
  "scenario": "S1",
  "suite_role": "control",
  "query_text": "What is the maximum size of an individual file I can upload through OpenAI's Files API?",
  "restrict_domain": null,
  "restriction_mechanism": null,
  "answer_key": "Individual files can be up to 512 MB, and each project can store up to 2.5 TB of files in total.",
  "key_urls": [
    {
      "url": "https://developers.openai.com/api/reference/resources/files/methods/create",
      "role": "supports"
    }
  ],
  "pass_criteria": "A returned result genuinely states 512 MB",
  "key_verified_date": "2026-09-07",
  "before_check_rule": null,
  "timestamp_utc": "2026-09-21T11:49:27Z",
  "region": "ap-south-1",
  "status": "ok",
  "graded": null,
  "pass_fail": null,
  "grader_notes": null,
  "latency_ms": 13955.1,
  "http_status": 200,
  "error": null,
  "attempts": 1,
  "results": [
    {
      "rank": 1,
      "url": "https://developers.openai.com/api/reference/resources/files/methods/create",
      "title": "Upload file | OpenAI API Reference",
      "content": "[Skip to content](https://developers.openai.com/api/reference/resources/files/methods/create#_top)\n\nFor the complete documentation index, see [llms.txt](https://developers.openai.com/llms.txt). Markdown versions of documentation pages are available by appending\n`.md` to the page URL.\n\n[API Reference](https://developers.openai.com/api/reference)\n\n[Files](https://developers.openai.com/api/reference/resources/files)\n\nCopy Markdown\n\nOpen in **ChatGPT**\n\n* * *\n\n**Copy Markdown**\n\n**View as Markdown**\n\n# Upload file\n\nPOST/files\n\nUpload a file that can be used across various endpoints. Individual files\ncan be up to 512 MB, and each project can store up to 2.5 TB of files in\ntotal. There is no organization-wide storage limit. Uploads to this\nendpoint are rate-limited to 1,000 requests per minute per authenticated\nuser.\n\n- The Assistants API supports files up to 2 million tokens and of specific\nfile types. See the [Assistants Tools guide](https://developers.openai.com/api/docs/guides/tools) for\ndetails.\n- The Fine-tuning API only supports `.jsonl` files. The input also has\ncertain required formats for fine-tuning\n[chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) or\n[completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) models.\n- The Batch API only supports `.jsonl` files up to 200 MB in size. The input\nalso has a specific required\n[format](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file).\n- For Retrieval or `file_search` ingestion, upload files here first. If\nyou need to attach multiple uploaded files to the same vector store, use\n[`/vector_stores/{vector_store_id}/file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create)\ninstead of attaching them one by one. Vector store attachment has separate\nlimits from file upload, including 2,000 attached files per minute per\norganization.\n\nPlease [contact us](https://help.openai.com/) if you need to increase these\nstorage limits.\n\n##### Body ParametersForm DataExpand Collapse\n\nfile: file\n\nThe File object (not file name) to be uploaded.\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20file%20%3E%20(schema))\n\npurpose: \"assistants\"or\"batch\"or\"fine-tune\"or3 more\n\nThe intended purpose of the uploaded file. One of:\n\n- `assistants`: Used in the Assistants API\n- `batch`: Used in the Batch API\n- `fine-tune`: Used for fine-tuning\n- `vision`: Images used for vision fine-tuning\n- `user_data`: Flexible file type for any purpose\n- `evals`: Used for eval data sets\n\nOne of the following:\n\n\"assistants\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20purpose%20%3E%20(schema)%20%3E%20(member)%200)\n\n\"batch\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20purpose%20%3E%20(schema)%20%3E%20(member)%201)\n\n\"fine-tune\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20purpose%20%3E%20(schema)%20%3E%20(member)%202)\n\n\"vision\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20purpose%20%3E%20(schema)%20%3E%20(member)%203)\n\n\"user\\_data\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20purpose%20%3E%20(schema)%20%3E%20(member)%204)\n\n\"evals\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20purpose%20%3E%20(schema)%20%3E%20(member)%205)\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20purpose%20%3E%20(schema))\n\nexpires\\_after: optional object {anchor, seconds}\n\nThe expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted.\n\nanchor: \"created\\_at\"\n\nAnchor timestamp after which the expiration policy applies. Supported anchors: `created_at`.\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20expires_after%20%3E%20(schema)%20%3E%20(property)%20anchor)\n\nseconds: number\n\nThe number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days).\n\nformatint64\n\nminimum3600\n\nmaximum2592000\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20expires_after%20%3E%20(schema)%20%3E%20(property)%20seconds)\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20expires_after%20%3E%20(schema))\n\n##### ReturnsExpand Collapse\n\nFileObjectobject {id, bytes, created\\_at, 6 more}\n\nThe `File` object represents a document that has been uploaded to OpenAI.\n\nid: string\n\nThe file identifier, which can be referenced in the API endpoints.\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20id)\n\nbytes: number\n\nThe size of the file, in bytes.\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20bytes)\n\ncreated\\_at: number\n\nThe Unix timestamp (in seconds) for when the file was created.\n\nformatunixtime\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20created_at)\n\nfilename: string\n\nThe name of the file.\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20filename)\n\nobject: \"file\"\n\nThe object type, which is always `file`.\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20object)\n\npurpose: \"assistants\"or\"assistants\\_output\"or\"batch\"or5 more\n\nThe intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, `vision`, and `user_data`.\n\nOne of the following:\n\n\"assistants\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%200)\n\n\"assistants\\_output\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%201)\n\n\"batch\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%202)\n\n\"batch\\_output\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%203)\n\n\"fine-tune\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%204)\n\n\"fine-tune-results\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%205)\n\n\"vision\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%206)\n\n\"user\\_data\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%207)\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose)\n\nDeprecatedstatus: \"uploaded\"or\"processed\"or\"error\"\n\nDeprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.\n\nOne of the following:\n\n\"uploaded\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%200)\n\n\"processed\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201)\n\n\"error\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%202)\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20status)\n\nexpires\\_at: optional number\n\nThe Unix timestamp (in seconds) for when the file will expire.\n\nformatunixtime\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20expires_at)\n\nDeprecatedstatus\\_details: optional string\n\nDeprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20status_details)\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema))\n\n### Upload file\n\nHTTP\n\nHTTP\n\nHTTP\n\nPython\n\nPython\n\nTypeScript\n\nTypeScript\n\nGo\n\nGo\n\nRuby\n\nRuby\n\nJava\n\nJava\n\nCLI Tool\n\nCLI Tool\n\n```\ncurl https://api.openai.com/v1/files \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -F purpose=\"fine-tune\" \\\n  -F file=\"@mydata.jsonl\"\n  -F expires_after[anchor]=\"created_at\"\n  -F expires_after[seconds]=2592000\n```\n\n```\n{\n  \"id\": \"file-abc123\",\n  \"object\": \"file\",\n  \"bytes\": 120000,\n  \"created_at\": 1677610602,\n  \"expires_at\": 1677614202,\n  \"filename\": \"mydata.jsonl\",\n  \"purpose\": \"fine-tune\",\n}\n```\n\n##### Returns Examples\n\n```\n{\n  \"id\": \"file-abc123\",\n  \"object\": \"file\",\n  \"bytes\": 120000,\n  \"created_at\": 1677610602,\n  \"expires_at\": 1677614202,\n  \"filename\": \"mydata.jsonl\",\n  \"purpose\": \"fine-tune\",\n}\n```",
      "content_chars": 12083,
      "published_date": null
    },
    {
      "rank": 2,
      "url": "https://help.openai.com/en/articles/8555545-file-uploads-faq",
      "title": "File Uploads FAQ | OpenAI Help Center",
      "content": "New sign-ups and upgrades to the ChatGPT Pro $200 plan are temporarily paused.\n\nExisting Pro $200 subscriptions will continue to renew as usual. [Learn more](https://help.openai.com/articles/9793128).\n\n[![OpenAI](https://help.openai.com/logo.png)](https://help.openai.com/en)\n\nLanguageEnglish\n\n[Login](https://help.openai.com/auth/login?redirectTo=%2Fauth%2Flogin-success%3FreturnTo%3D%252Fen%252Farticles%252F8555545-file-uploads-faq)\n\n# File Uploads FAQ\n\nFile Uploads FAQ\n\nUpdated: 10 days ago\n\n## About file uploads\n\nChatGPT can work with documents, spreadsheets, presentations, and other supported files you upload in a conversation.\n\n## Availability\n\nFile uploads are available on Free and paid ChatGPT plans, subject to plan-specific usage limits and account settings, on the web and in supported mobile apps. File uploads are also available through the API for supported API features, with separate API requirements, supported purposes, and limits.\n\n## How does the new file uploads capability work?\n\nThe file uploads capability was created to support the following tasks:\n\n**Synthesis:** Combining or analyzing information from files and documents to create something new, for example:\n\n- Upload a spreadsheet, for example a CSV, with a mix of qualitative and quantitative information, and ask ChatGPT to help you understand and visualize the data.\n\n- Compare and contrast two documents.\n\n- Analyze sentiment or tone in a document.\n\n- Analyze a spreadsheet.\n\n- Apply a framework or rubric from one document to the contents of another.\n\n\n**Transformation:** Reshaping information from documents without changing its essence, for example:\n\n- Upload a complicated research paper and ask ChatGPT to provide a simple summary.\n\n- Upload a PowerPoint presentation and ask ChatGPT for feedback on the content.\n\n- Summarize a document in simple terms.\n\n- Rewrite a short document in a particular style.\n\n- Turn a presentation into a document.\n\n\n**Extraction:** Pulling specific information out of a document, for example:\n\n- Upload a PDF and have ChatGPT find any references to a certain topic.\n\n- Pull out relevant quotes from a document.\n\n- Search for any mention of a particular topic from a document or spreadsheet.\n\n- Extract metadata (author, creation date, etc.) from a document.\n\n- Count the number of rows in a spreadsheet that contain a certain attribute.\n\n- Extract specific sections of a document (e.g., all headings or all bullet-point lists).\n\n\n## What types of files are supported?\n\nAll common file extensions for text files, spreadsheets, presentations, and documents.\n\n## How many files can I upload at once per GPT?\n\nUp to **10** files per GPT for the lifetime of that GPT. Keep in mind there are file size restrictions and usage caps per user/org.\n\n## What are the file upload size restrictions?\n\n- All files uploaded to a GPT or a ChatGPT conversation have a hard limit of 512MB per file.\n\n- All text and document files uploaded to a GPT or to a ChatGPT conversation are capped at 2M tokens per file. This limitation does not apply to spreadsheets.\n\n- For CSV files or spreadsheets, the file size cannot exceed approximately 50MB, depending on the size of each row.\n\n- For images, there's a limit of 20MB per image.\n\n- Additionally, there are usage caps:\n\n  - Each end-user is capped at 25GB.\n\n  - Each organization is capped at 100GB.\n\n  - Note: An error will be displayed if a user/org cap has been hit.\n\nUsers can upload up to 80 files every 3 hours. Free users are limited to 3 file uploads per day. Note that we may lower these limits during peak hours.\n\nTroubleshooting \u201cupload limit reached\u201d\n\nIf you see an \u201cupload limit reached\u201d message despite few or no recent uploads, try the steps below:\n\n- Confirm you\u2019re signed into the correct account and subscription plan.\n\n- Remember there are two kinds of limits: a rolling upload rate (e.g., up to 80 files per 3 hours) and shared storage caps (25 GB per user / 100 GB per org) that apply across chats, Projects, and custom GPT knowledge.\n\n- Failed upload attempts can sometimes count toward the upload-rate cap.\n\n- Check status.openai.com for incidents that may affect uploads.\n\n- To escalate, include your account email, a screenshot, the timestamp and timezone, the platform/app/browser you used, and the request ID (if available).\n\n\nCurrently, you can check your Library storage usage in ChatGPT under Settings > Storage. ChatGPT does not currently show how much of your rolling upload-rate quota has been used or how much remains.\n\nAdditionally, to help ensure a smooth experience for all users, we've also updated the file upload limits for _Projects_ based on subscription plan.\n\n- **Free**: Up to 5 files per project\n\n- **Go, Plus**: Up to 25 files per project\n\n- **Edu, Pro, Business, Enterprise**: Up to 40 files per project\n\n\n## How do I delete files I upload?\n\nFiles uploaded to Advanced Data Analysis are deleted within a duration that varies based on your plan. If you are encountering your file usage cap, you can also delete files from recent chats or from any GPTs that you built, as these share caps.\n\n## How are files vs chats retained?\n\nChats\n\n1. Chats are saved in your account until you delete them. To learn more about data controls, see: [Data Controls FAQ](https://help.openai.com/articles/7730893).\n\n2. Once you delete a chat or delete your account, chats are deleted from our systems within 30 days, unless they have previously been de-identified and disassociated from your account, or we have to keep them for security or legal reasons.\n\n\nFiles\n\n1. Files uploaded to ChatGPT are saved in your account up to the retention period of the corresponding chat. Files uploaded as knowledge to a custom GPT are retained until you delete the custom GPT.\n\n2. Once you delete a chat containing a file, your account, or a custom GPT, the associated file is deleted from our systems within 30 days, unless it has previously been de-identified and disassociated from your account, or we have to keep it for security or legal reasons.\n\n3. Files processed via ADA / Document Analysis, and when chatting with a custom GPT (not uploaded as knowledge in GPT config): Retained for a duration that varies based on your plan.\n\n\nFor more information about file and chat retention, see: [Chat and File Retention Policies in ChatGPT](https://help.openai.com/articles/8983778).\n\n## Are you able to handle images embedded in docs/presentations/PDF?\n\nThe answer depends on your plan and the file type you're working with.\n\nChatGPT Enterprise supports Visual Retrieval for PDF files. To learn more about PDF visual retrieval, see: [Visual Retrieval with PDFs FAQ](https://help.openai.com/articles/10416312).\n\nAll other plans and document files only support text-based retrieval. This means that ChatGPT will extract digital text from the file and discard any images.\n\n## Will OpenAI use files uploaded to train its models?\n\nThe answer depends on the service you are using. For more information about data usage for consumer services, see: [Data Usage for Consumer Services FAQ](https://help.openai.com/articles/7039943). Content may include files that are uploaded. To learn more about how content may be used to improve model performance and the choices you have, see: [How your data is used to improve model performance](https://help.openai.com/articles/5722486).\n\nPlease note that we do not use content submitted by customers to our business offerings such as our API and ChatGPT Enterprise to improve model performance.\n\nPlease see our [Enterprise Privacy page](https://openai.com/enterprise-privacy) for information on how we use business data.\n\n## Need more help? Contact us for product questions, account support and general troubleshooting.\n\nAI Chat\n\nChat now\n\nAI Phone Call\n\n[1-888-GPT-0090](tel:+18884780090)\n\nCalls may be recorded to improve OpenAI services. If you wish to report content, please use the in-app reporting or the [Report Content Form](https://openai.com/form/report-content/). [Learn more.](https://help.openai.com/articles/11391933-1-888-gpt-0090-openai-help-over-phone)\n\n## Related articles\n\n- [How does the new file uploads capability work?\\\\\n\\\\\nHow does file uploading help? What can I do with it?](https://help.openai.com/en/articles/8982896-how-does-the-new-file-uploads-capability-work)\n- [ChatGPT Capabilities Overview\\\\\n\\\\\nLearn about ChatGPT's capabilities and features](https://help.openai.com/en/articles/9260256-chatgpt-capabilities-overview)\n- [Using Codex with your ChatGPT plan\\\\\n\\\\\nLearn how to access and get started with Codex.](https://help.openai.com/en/articles/11369540-using-codex-with-your-chatgpt-plan)\n\n## Was this article helpful?\n\nSubmit",
      "content_chars": 8665,
      "published_date": null
    },
    {
      "rank": 3,
      "url": "https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472",
      "title": "Questions about File Upload Limits with the OpenAI File API - API ...",
      "content": "[Skip to last reply](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472/4) [Skip to top](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472/1)\n\n[Skip to main content](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472#main-container)\n\n# [Questions about File Upload Limits with the OpenAI File API](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472)\n\n[API](https://community.openai.com/c/api/7)\n\n- [file-uploads](https://community.openai.com/tag/file-uploads/395),\n- [vector-store](https://community.openai.com/tag/vector-store/654),\n- [file-search](https://community.openai.com/tag/file-search/707)\n\nYou have selected **0** posts.\n\n[select all](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472)\n\n[cancel selecting](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472)\n\n1.5k\nviews\n2\nlinks\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/aprendendo.next/48/721758_2.png)](https://community.openai.com/u/aprendendo.next \"aprendendo.next\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/brother0326/48/667697_2.png)](https://community.openai.com/u/brother0326 \"brother0326\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/wendyjiao/48/511350_2.png)](https://community.openai.com/u/wendyjiao \"wendyjiao\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/48/719663_2.png)](https://community.openai.com/u/_j \"_j\")\n\n[Sep 2025](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472/1 \"Jump to the first post\")\n\n1 / 4\n\n\nSep 2025\n\n\n[Sep 2025](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472/4)\n\n## post by brother0326 on Sep 16, 2025\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/brother0326/48/667697_2.png)](https://community.openai.com/u/brother0326)\n\n[brother0326](https://community.openai.com/u/brother0326)\n\n[Sep 2025](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472 \"Post date\")\n\nHi, I have a question regarding OpenAI file uploads.\n\nAccording to the [File uploads FAQ](https://help.openai.com/en/articles/8555545-file-uploads-faq), it seems that the number of files you can upload depends on your ChatGPT plan.\n\nHowever, when I use the **OpenAI File API**, I don\u2019t seem to run into this limitation.\n\n- For example, I uploaded around 100 files through the API and connected them to a Vector Store without hitting any restrictions.\n\nFrom what I understand, the only clear limits are:\n\n- Maximum file size per upload: **512MB**\n\n- Maximum total storage per organization: **100GB**\n\n\nSo my questions are:\n\n1. Is there **no specific limit on the number of files** that can be uploaded via the File API?\n\n2. Is there a defined limit on the **number of files that can be attached to a single Vector Store**?\n\n\nIf anyone has official guidance or experience on these constraints, I\u2019d really appreciate your input.\n\nMe too\n\n1.5k\nviews\n2\nlinks\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/aprendendo.next/48/721758_2.png)](https://community.openai.com/u/aprendendo.next \"aprendendo.next\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/brother0326/48/667697_2.png)](https://community.openai.com/u/brother0326 \"brother0326\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/wendyjiao/48/511350_2.png)](https://community.openai.com/u/wendyjiao \"wendyjiao\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/48/719663_2.png)](https://community.openai.com/u/_j \"_j\")\n\n## post by \\_j on Sep 16, 2025\n\n## post by aprendendo.next on Sep 16, 2025\n\n## post by wendyjiao on Sep 22, 2025\n\nReply\n\n### Related topics\n\n| Topic | Replies | Views | Activity |\n| --- | --- | --- | --- |\n| [Open AI API file upload limitations on Chat Completions APi](https://community.openai.com/t/open-ai-api-file-upload-limitations-on-chat-completions-api/1372667)<br>[API](https://community.openai.com/c/api/7) | [8](https://community.openai.com/t/open-ai-api-file-upload-limitations-on-chat-completions-api/1372667/1) | 992 | [Jan 28](https://community.openai.com/t/open-ai-api-file-upload-limitations-on-chat-completions-api/1372667/10) |\n| [Confused about file upload limits](https://community.openai.com/t/confused-about-file-upload-limits/1236701)<br>[ChatGPT](https://community.openai.com/c/chatgpt/19) <br>- [file-uploads](https://community.openai.com/tag/file-uploads/395) | [0](https://community.openai.com/t/confused-about-file-upload-limits/1236701/1) | 6.5k | [Apr 2025](https://community.openai.com/t/confused-about-file-upload-limits/1236701/1) |\n| [What are the default rate limits for the File API](https://community.openai.com/t/what-are-the-default-rate-limits-for-the-file-api/978364)<br>[API](https://community.openai.com/c/api/7) <br>- [rate-limit](https://community.openai.com/tag/rate-limit/129) | [3](https://community.openai.com/t/what-are-the-default-rate-limits-for-the-file-api/978364/1) | 631 | [Oct 2024](https://community.openai.com/t/what-are-the-default-rate-limits-for-the-file-api/978364/4) |\n| [Is it indeed correct you can upload more than 20 files in a thread? My testing shows you can](https://community.openai.com/t/is-it-indeed-correct-you-can-upload-more-than-20-files-in-a-thread-my-testing-shows-you-can/670013)<br>[API](https://community.openai.com/c/api/7) | [3](https://community.openai.com/t/is-it-indeed-correct-you-can-upload-more-than-20-files-in-a-thread-my-testing-shows-you-can/670013/1) | 1.7k | [Jun 2024](https://community.openai.com/t/is-it-indeed-correct-you-can-upload-more-than-20-files-in-a-thread-my-testing-shows-you-can/670013/4) |\n| [Max 100 files in vector store](https://community.openai.com/t/max-100-files-in-vector-store/729876)<br>[API](https://community.openai.com/c/api/7) <br>- [assistants](https://community.openai.com/tag/assistants/345) | [9](https://community.openai.com/t/max-100-files-in-vector-store/729876/1) | 5.7k | [May 2024](https://community.openai.com/t/max-100-files-in-vector-store/729876/10) |\n\nTopic list, column headers with buttons are sortable.\n\nDeveloper Community\n\n\nConnect with other developers building with the OpenAI Platform.\n\n\nHelp\n\n\n- [Support](https://help.openai.com/en/articles/6614161-how-can-i-contact-support)\n\nDeveloper Resources\n\n\n- [API Documentation](https://platform.openai.com/overview)\n- [Service status](https://status.openai.com/)\n- [Cookbook](https://github.com/openai/openai-cookbook)\n\n[Terms & policies](https://openai.com/policies) [Privacy policy](https://openai.com/policies/privacy-policy)",
      "content_chars": 6992,
      "published_date": "2025-09-16T23:24:30"
    },
    {
      "rank": 4,
      "url": "https://www.reddit.com/r/OpenAI/comments/1lhvkum/open_ai_10_gb_file_limit/",
      "title": "r/OpenAI on Reddit: Open AI 10 GB file limit",
      "content": "[Skip to main content](#main-content)\n\n\n\n\n\n[Go to OpenAI](https://www.reddit.com/r/OpenAI/)\n\n[r/OpenAI](https://www.reddit.com/r/OpenAI/)\n\n\u20221y ago\n\n[xodac](https://www.reddit.com/user/xodac/)\n\n\n# Open AI 10 GB file limit\n\n[Question](/r/OpenAI/?f=flair_name%3A%22Question%22)\n\nOpen AI says here a user can only upload 10GB of data: <https://help.openai.com/en/articles/8983719-what-are-the-file-upload-size-restrictions>\n\nBut they don't specify a timeframe. Is there per day/week/month/year? Or permanent? If permanent, is it possible to go back and delete any files I uploaded previously\n\nShare\n\n\n# People also ask about section\n\nPeople also ask about\n\n[Open AI file upload size restrictions](https://www.reddit.com/answers/db3c2f44-7fa2-413a-a356-60303fef6d9f/?q=Open+AI+file+upload+size+restrictions&source=PDP&ep=pdp_unit&relatedPostId=t3_1lhvkum)\n\n[File uploads FAQ for ChatGPT](https://www.reddit.com/answers/cdb227a4-d344-4ba7-bb70-e0504586a479/?q=File+uploads+FAQ+for+ChatGPT&source=PDP&ep=pdp_unit&relatedPostId=t3_1lhvkum)\n\n[ChatGPT file upload limits](https://www.reddit.com/answers/043ce53f-c240-4b06-afce-465f0fa8463f/?q=ChatGPT+file+upload+limits&source=PDP&ep=pdp_unit&relatedPostId=t3_1lhvkum)\n\n[Failed to delete files in ChatGPT](https://www.reddit.com/answers/ed7168ce-7e1d-42a2-a432-7b7ac78b86b9/?q=Failed+to+delete+files+in+ChatGPT&source=PDP&ep=pdp_unit&relatedPostId=t3_1lhvkum)\n\n[Impact of AI on job markets](https://www.reddit.com/answers/364ae522-f544-47a5-a408-cae0bdffdb73/?q=Impact+of+AI+on+job+markets&source=PDP&ep=pdp_unit&relatedPostId=t3_1lhvkum)\n\n\n[https://www.openai.com/](https://openai.com/) - [https://help.openai.com/](https://help.openai.com/en)\n\nPublic\n\n\n\nAnyone can view, post, and comment to this community\n\n00\n\n## Top Posts\n\n* [Reddit reReddit: Top posts of June 22, 2025 ---](https://www.reddit.com/posts/2025/june-22-1/global/)\n* [Reddit reReddit: Top posts of June 2025 ---](https://www.reddit.com/posts/2025/june/global/)\n* [Reddit reReddit: Top posts of 2025 ---](https://www.reddit.com/posts/2025/global/)\n\n* [Home](/?feed=home)\n* [Popular](/r/popular/)\n* [News](/news/)\n* [Explore](/explore/)\n* [Best of Reddit](https://www.reddit.com/posts/2026/global/)\n* [Best of Reddit in Portuguese](https://www.reddit.com/posts/2026/tl-pt-BR/)\n* [Best of Reddit in German](https://www.reddit.com/posts/2026/tl-de/)\n* [Reddit Rules](https://www.redditinc.com/policies/content-policy)\n* [Privacy Policy](https://www.reddit.com/policies/privacy-policy)\n* [User Agreement](https://www.redditinc.com/policies/user-agreement)\n* [Your Privacy Choices](https://support.reddithelp.com/hc/articles/43980704794004)\n* [Accessibility](https://support.reddithelp.com/hc/sections/38303584022676-Accessibility)\n* [Reddit, Inc. \u00a9 2026. All rights reserved.](https://redditinc.com)\n\nJoin the most real place on the internet\n\n\n\nContinue with Phone Number\n\n\n\nContinue with Email\n\nBy continuing, you agree to our [User Agreement](https://www.redditinc.com/policies/user-agreement) and acknowledge that you understand the [Privacy Policy](https://www.redditinc.com/policies/privacy-policy).\n\n\n\n  \n",
      "content_chars": 3114,
      "published_date": "2025-06-22T18:55:43"
    },
    {
      "rank": 5,
      "url": "https://community.openai.com/t/assistant-v2-files-size-limit/724950",
      "title": "Assistant V2 files. Size limit - API - OpenAI Developer Community",
      "content": "[Skip to last reply](https://community.openai.com/t/assistant-v2-files-size-limit/724950/5) [Skip to top](https://community.openai.com/t/assistant-v2-files-size-limit/724950/1)\n\n[Skip to main content](https://community.openai.com/t/assistant-v2-files-size-limit/724950#main-container)\n\n# [Assistant V2 files. Size limit](https://community.openai.com/t/assistant-v2-files-size-limit/724950)\n\n[API](https://community.openai.com/c/api/7)\n\nYou have selected **0** posts.\n\n[select all](https://community.openai.com/t/assistant-v2-files-size-limit/724950)\n\n[cancel selecting](https://community.openai.com/t/assistant-v2-files-size-limit/724950)\n\n6.2k\nviews\n5\nlinks\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/parkforce/48/237870_2.png)2](https://community.openai.com/u/parkforce \"parkforce\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ahmedr_s/48/422102_2.png)](https://community.openai.com/u/ahmedr_s \"ahmedr_s\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/veitb/48/712987_2.png)](https://community.openai.com/u/VeitB \"VeitB\")\n\n[![](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/48.png)](https://community.openai.com/u/anon22939549 \"anon22939549\")\n\nSummarize\n\n[Apr 2024](https://community.openai.com/t/assistant-v2-files-size-limit/724950/1 \"Jump to the first post\")\n\n1 / 5\n\n\nApr 2024\n\n\n[Jul 2024](https://community.openai.com/t/assistant-v2-files-size-limit/724950/5)\n\n## post by parkforce on Apr 22, 2024\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/parkforce/48/237870_2.png)](https://community.openai.com/u/parkforce)\n\n[parkforce](https://community.openai.com/u/parkforce)\n\n[Apr 2024](https://community.openai.com/t/assistant-v2-files-size-limit/724950 \"Post date\")\n\nI see from here ( dated a while ago) [In Assistants, Is there a limit to File size and number of files? - #5 by tyagi.shubham177](https://community.openai.com/t/in-assistants-is-there-a-limit-to-file-size-and-number-of-files/477422/5)\n\n\u201cYou can attach a maximum of 20 files per Assistant, and they can be at most 512 MB each.\u201d\n\nI have tried to upload to the vector store some PDF\u2019s of which 2 are 450 meg & 350 meg.\n\nThe 2 larger files show in the vector store but marked \u2018Failed\u2019\n\nWhere can I find documentation on file limits ?\n\nAny help appreciated.\n\nMe too\n\n6.2k\nviews\n5\nlinks\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/parkforce/48/237870_2.png)2](https://community.openai.com/u/parkforce \"parkforce\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ahmedr_s/48/422102_2.png)](https://community.openai.com/u/ahmedr_s \"ahmedr_s\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/veitb/48/712987_2.png)](https://community.openai.com/u/VeitB \"VeitB\")\n\n[![](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/48.png)](https://community.openai.com/u/anon22939549 \"anon22939549\")\n\nSummarize\n\n## post by anon22939549 on Apr 23, 2024\n\n## post by VeitB on Apr 23, 2024\n\n## post by parkforce on Apr 23, 2024\n\n3 months later\n\n\n## post by ahmedr\\_s on Jul 13, 2024\n\nReply\n\n### Related topics\n\n| Topic | Replies | Views | Activity |\n| --- | --- | --- | --- |\n| [Maximum Files per Assistant (20) to low](https://community.openai.com/t/maximum-files-per-assistant-20-to-low/1114704)<br>[API](https://community.openai.com/c/api/7) | [5](https://community.openai.com/t/maximum-files-per-assistant-20-to-low/1114704/1) | 639 | [Feb 2025](https://community.openai.com/t/maximum-files-per-assistant-20-to-low/1114704/6) |\n| [AI assistants file limits](https://community.openai.com/t/ai-assistants-file-limits/566434)<br>[API](https://community.openai.com/c/api/7) <br>- [assistants-api](https://community.openai.com/tag/assistants-api/355) | [10](https://community.openai.com/t/ai-assistants-file-limits/566434/1) | 13.9k | [Oct 2024](https://community.openai.com/t/ai-assistants-file-limits/566434/11) |\n| [In Assistants, Is there a limit to File size and number of files?](https://community.openai.com/t/in-assistants-is-there-a-limit-to-file-size-and-number-of-files/477422)<br>[API](https://community.openai.com/c/api/7) | [6](https://community.openai.com/t/in-assistants-is-there-a-limit-to-file-size-and-number-of-files/477422/1) | 9.3k | [Nov 2023](https://community.openai.com/t/in-assistants-is-there-a-limit-to-file-size-and-number-of-files/477422/7) |\n| [400GB to Vector Store(s) + Assistant](https://community.openai.com/t/400gb-to-vector-store-s-assistant/1363219)<br>[API](https://community.openai.com/c/api/7) <br>- [vector-store](https://community.openai.com/tag/vector-store/654) | [12](https://community.openai.com/t/400gb-to-vector-store-s-assistant/1363219/1) | 602 | [Oct 2025](https://community.openai.com/t/400gb-to-vector-store-s-assistant/1363219/13) |\n| [Failed to index file File contains too may tokens. Max allowed tokens per file is 2000000](https://community.openai.com/t/failed-to-index-file-file-contains-too-may-tokens-max-allowed-tokens-per-file-is-2000000/512298)<br>[API](https://community.openai.com/c/api/7) <br>- [api](https://community.openai.com/tag/api/33),<br>- [assistants](https://community.openai.com/tag/assistants/345) | [22](https://community.openai.com/t/failed-to-index-file-file-contains-too-may-tokens-max-allowed-tokens-per-file-is-2000000/512298/1) | 5.0k | [Mar 2024](https://community.openai.com/t/failed-to-index-file-file-contains-too-may-tokens-max-allowed-tokens-per-file-is-2000000/512298/23) |\n\nTopic list, column headers with buttons are sortable.\n\nDeveloper Community\n\n\nConnect with other developers building with the OpenAI Platform.\n\n\nHelp\n\n\n- [Support](https://help.openai.com/en/articles/6614161-how-can-i-contact-support)\n\nDeveloper Resources\n\n\n- [API Documentation](https://platform.openai.com/overview)\n- [Service status](https://status.openai.com/)\n- [Cookbook](https://github.com/openai/openai-cookbook)\n\n[Terms & policies](https://openai.com/policies) [Privacy policy](https://openai.com/policies/privacy-policy)",
      "content_chars": 6080,
      "published_date": "2024-04-22T18:52:19"
    },
    {
      "rank": 6,
      "url": "https://community.openai.com/t/ai-assistants-file-limits/566434",
      "title": "AI assistants file limits - API - OpenAI Developer Community",
      "content": "[Skip to last reply](https://community.openai.com/t/ai-assistants-file-limits/566434/12) [Skip to top](https://community.openai.com/t/ai-assistants-file-limits/566434/1)\n\n[Skip to main content](https://community.openai.com/t/ai-assistants-file-limits/566434#main-container)\n\n# [AI assistants file limits](https://community.openai.com/t/ai-assistants-file-limits/566434)\n\n[API](https://community.openai.com/c/api/7)\n\n- [assistants-api](https://community.openai.com/tag/assistants-api/355)\n\nYou have selected **0** posts.\n\n[select all](https://community.openai.com/t/ai-assistants-file-limits/566434)\n\n[cancel selecting](https://community.openai.com/t/ai-assistants-file-limits/566434)\n\n13.9k\nviews\n8\nlikes\n6\nlinks\n6\nusers\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/jlvanhulst/48/195305_2.png)5](https://community.openai.com/u/jlvanhulst \"jlvanhulst\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/aviplo/48/276278_2.png)2](https://community.openai.com/u/aviplo \"aviplo\")\n\n[![](https://avatars.discourse-cdn.com/v4/letter/r/da6949/48.png)](https://community.openai.com/u/rn1 \"rn1\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/bill-ai/48/448778_2.png)](https://community.openai.com/u/Bill-AI \"Bill-AI\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/rizwan.ahmed/48/448466_2.png)](https://community.openai.com/u/rizwan.ahmed \"rizwan.ahmed\")\n\nSummarize\n\n[Dec 2023](https://community.openai.com/t/ai-assistants-file-limits/566434/1 \"Jump to the first post\")\n\n1 / 12\n\n\nDec 2023\n\n\n[Oct 2024](https://community.openai.com/t/ai-assistants-file-limits/566434/12)\n\n## post by aviplo on Dec 20, 2023\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/aviplo/48/276278_2.png)](https://community.openai.com/u/aviplo)\n\n[aviplo](https://community.openai.com/u/aviplo)\n\n[Dec 2023](https://community.openai.com/t/ai-assistants-file-limits/566434 \"Post date\")\n\nI\u2019m working on setting up a super flexible AI buddy that can tweak its hosted files on the fly. The idea is to make a smart system that keeps getting better based on how it performs and what my company needs. When I see that my AI sidekick needs more training, I\u2019m planning to smoothly add more info to make it even better.\n\nRight now, openai has a rule that says we can only have up to 20 files. This rule is a bit of a headache, especially since I\u2019m planning to fine-tune the AI\u2019s performance regularly. Because this project is always changing and needs constant upgrades, it\u2019s important to figure out how to handle this file limit. Finding the right balance between making the AI awesome and dealing with the 20-file cap takes some careful thinking and considering different options to make sure this whole thing is a success.\n\nMe too\n\n13.9k\nviews\n8\nlikes\n6\nlinks\n6\nusers\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/jlvanhulst/48/195305_2.png)5](https://community.openai.com/u/jlvanhulst \"jlvanhulst\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/aviplo/48/276278_2.png)2](https://community.openai.com/u/aviplo \"aviplo\")\n\n[![](https://avatars.discourse-cdn.com/v4/letter/r/da6949/48.png)](https://community.openai.com/u/rn1 \"rn1\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/bill-ai/48/448778_2.png)](https://community.openai.com/u/Bill-AI \"Bill-AI\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/rizwan.ahmed/48/448466_2.png)](https://community.openai.com/u/rizwan.ahmed \"rizwan.ahmed\")\n\nSummarize\n\n## post by jlvanhulst on Dec 20, 2023\n\n## post by Foxalabs on Dec 20, 2023\n\n## post by jlvanhulst on Dec 20, 2023\n\n## post by aviplo on Dec 20, 2023\n\n## post by jlvanhulst on Dec 20, 2023\n\n1 month later\n\n\n## post by rn1 on Jan 23, 2024\n\n## post by jlvanhulst on Jan 23, 2024\n\n2 months later\n\n\n## post by Bill-AI on Mar 15, 2024\n\n## post by jlvanhulst on Mar 16, 2024\n\n7 months later\n\n\n## post by rizwan.ahmed on Oct 3, 2024\n\n## Closed on Oct 3, 2024\n\nReply\n\n### Related topics\n\n| Topic | Replies | Views | Activity |\n| --- | --- | --- | --- |\n| [The 20 File Limit on assistants is not useful for large Retrieval-Augmented Generation](https://community.openai.com/t/the-20-file-limit-on-assistants-is-not-useful-for-large-retrieval-augmented-generation/492800)<br>[API](https://community.openai.com/c/api/7) <br>- [assistants](https://community.openai.com/tag/assistants/345) | [5](https://community.openai.com/t/the-20-file-limit-on-assistants-is-not-useful-for-large-retrieval-augmented-generation/492800/1) | 3.9k | [Nov 2023](https://community.openai.com/t/the-20-file-limit-on-assistants-is-not-useful-for-large-retrieval-augmented-generation/492800/6) |\n| [Maximum Files per Assistant (20) to low](https://community.openai.com/t/maximum-files-per-assistant-20-to-low/1114704)<br>[API](https://community.openai.com/c/api/7) | [5](https://community.openai.com/t/maximum-files-per-assistant-20-to-low/1114704/1) | 638 | [Feb 2025](https://community.openai.com/t/maximum-files-per-assistant-20-to-low/1114704/6) |\n| [Only 20 files per Assistant?](https://community.openai.com/t/only-20-files-per-assistant/520976)<br>[Feedback](https://community.openai.com/c/api/feedback/31) | [4](https://community.openai.com/t/only-20-files-per-assistant/520976/1) | 1.8k | [Nov 2023](https://community.openai.com/t/only-20-files-per-assistant/520976/6) |\n| [Assistant V2 files. Size limit](https://community.openai.com/t/assistant-v2-files-size-limit/724950)<br>[API](https://community.openai.com/c/api/7) | [4](https://community.openai.com/t/assistant-v2-files-size-limit/724950/1) | 6.2k | [Jul 2024](https://community.openai.com/t/assistant-v2-files-size-limit/724950/5) |\n| [Increasing the maximum number of files that can be attached to an assistant](https://community.openai.com/t/increasing-the-maximum-number-of-files-that-can-be-attached-to-an-assistant/538331)<br>[Feedback](https://community.openai.com/c/api/feedback/31) <br>- [assistants-api](https://community.openai.com/tag/assistants-api/355),<br>- [assistants](https://community.openai.com/tag/assistants/345) | [12](https://community.openai.com/t/increasing-the-maximum-number-of-files-that-can-be-attached-to-an-assistant/538331/1) | 2.5k | [Dec 2024](https://community.openai.com/t/increasing-the-maximum-number-of-files-that-can-be-attached-to-an-assistant/538331/16) |\n\nTopic list, column headers with buttons are sortable.\n\nDeveloper Community\n\n\nConnect with other developers building with the OpenAI Platform.\n\n\nHelp\n\n\n- [Support](https://help.openai.com/en/articles/6614161-how-can-i-contact-support)\n\nDeveloper Resources\n\n\n- [API Documentation](https://platform.openai.com/overview)\n- [Service status](https://status.openai.com/)\n- [Cookbook](https://github.com/openai/openai-cookbook)\n\n[Terms & policies](https://openai.com/policies) [Privacy policy](https://openai.com/policies/privacy-policy)",
      "content_chars": 6998,
      "published_date": "2023-12-20T14:24:09"
    },
    {
      "rank": 7,
      "url": "https://learn.microsoft.com/en-us/answers/questions/1499220/maximum-file-size-for-openai-service",
      "title": "Maximum file size for OpenAI service - Microsoft Q&A",
      "content": "An Azure service that provides access to OpenAI\u2019s GPT-3 models with enterprise capabilities.\n\nThanks for the question, If you want to use OpenAI models to do question answering\\completions on your custom data text files, this limit applies to how many data files you can upload and the total size of the files. There is an upload limit, and there are some caveats about document structure and how it might affect the quality of responses from the model. Azure AI Studio and Azure AI Search are two separate services with different capabilities and limitations. The 16MB file size limit you mentioned refers to the maximum size of files that can be uploaded directly to Azure AI Studio. This limit is in place to ensure efficient processing and to optimize the user experience.\n\nOn the other hand, Azure AI Search allows you to index data from various sources, including Azure Blob Storage. When using Azure Blob Storage as a data source, the file size limit for individual PDF files is 25MB. This limit is specific to Azure AI Search and is separate from the file size limit for uploads in Azure AI Studio.\n\nIn summary, the file size limits for Azure AI Studio and Azure AI Search are different because they are separate services with different capabilities and limitations.",
      "content_chars": 1274,
      "published_date": "2024-01-17T00:00:00"
    },
    {
      "rank": 8,
      "url": "https://community.openai.com/t/openai-file-size-limit-and-batch-api-result-files/897738",
      "title": "OpenAI File Size Limit and Batch API result files - API - OpenAI ...",
      "content": "I am using Batch API to embed large amount of documents. OpenAI has a total file size limit per organization of 100 GB, which affects the amount of data I can upload at any time for processing them. How about the result files? Do their size count towards this limit?",
      "content_chars": 266,
      "published_date": "2024-08-07T15:54:49"
    },
    {
      "rank": 9,
      "url": "https://developers.openai.com/api/docs/guides/file-inputs",
      "title": "File inputs | OpenAI API",
      "content": "For the complete documentation index, see [llms.txt](https://developers.openai.com/llms.txt). Markdown versions of documentation pages are available by appending\n`.md` to the page URL.\n\n## Search the API docs\n\nSearch docs\n\n### Suggested\n\nresponse\\_formatreasoning\\_effortstreamingtools\n\nPrimary navigation\n\nSearch docs\n\n### Suggested\n\nresponse\\_formatreasoning\\_effortstreamingtools\n\nOverview  Models  Agents  Tools  Audio & voice  Production  API reference\n\nOverviewModelsAgentsToolsAudio & voiceProductionAPI referenceDocsOverview\n\n- [Home](https://developers.openai.com/api/docs)\n\n### Get started\n\n- [Quickstart](https://developers.openai.com/api/docs/quickstart)\n- [Using GPT-6 Astra](https://developers.openai.com/api/docs/guides/latest-model)\n- [Key concepts](https://developers.openai.com/api/docs/concepts)\n\n### Core concepts\n\n- [Responses API](https://developers.openai.com/api/docs/guides/migrate-to-responses)\n- [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state)\n- [Background mode](https://developers.openai.com/api/docs/guides/background)\n- [Streaming](https://developers.openai.com/api/docs/guides/streaming-responses)\n- [WebSocket mode](https://developers.openai.com/api/docs/guides/websocket-mode)\n- [Mid-turn steering](https://developers.openai.com/api/docs/guides/steering)\n- [Multi-agent](https://developers.openai.com/api/docs/guides/responses-multi-agent)\n- [Webhooks](https://developers.openai.com/api/docs/guides/webhooks)\n- [File inputs](https://developers.openai.com/api/docs/guides/file-inputs)\n- [Compaction](https://developers.openai.com/api/docs/guides/compaction)\n- [Counting tokens](https://developers.openai.com/api/docs/guides/token-counting)\n\n### SDKs and CLI\n\n- [OpenAI SDK](https://developers.openai.com/api/docs/libraries)\n- [OpenAI CLI](https://developers.openai.com/api/docs/libraries/openai-cli)\n\n### Resources\n\n- [Changelog](https://developers.openai.com/api/docs/changelog)\n- [Deprecations](https://developers.openai.com/api/docs/deprecations)\n- [Supported countries](https://developers.openai.com/api/docs/supported-countries)\n- [OpenAI Crawlers](https://developers.openai.com/api/docs/bots)\n- [Terms and policies](https://openai.com/policies)\n\n### Legacy APIs\n\n- Agent Builder\n\n  - [Overview](https://developers.openai.com/api/docs/guides/agent-builder)\n  - [Migration guide](https://developers.openai.com/api/docs/guides/agent-builder/migrate-from-agent-builder)\n  - [Node reference](https://developers.openai.com/api/docs/guides/node-reference)\n  - [Safety in building agents](https://developers.openai.com/api/docs/guides/agent-builder-safety)\n\n- Evals\n\n  - [Getting started](https://developers.openai.com/api/docs/guides/evaluation-getting-started)\n  - [Working with evals](https://developers.openai.com/api/docs/guides/evals)\n  - [Prompt optimizer](https://developers.openai.com/api/docs/guides/prompt-optimizer)\n  - [External models](https://developers.openai.com/api/docs/guides/external-models)\n  - [Best practices](https://developers.openai.com/api/docs/guides/evaluation-best-practices)\n  - [Graders](https://developers.openai.com/api/docs/guides/graders)\n\n- Fine-tuning\n\n  - [Optimization cycle](https://developers.openai.com/api/docs/guides/model-optimization)\n  - [Supervised fine-tuning](https://developers.openai.com/api/docs/guides/supervised-fine-tuning)\n  - [Vision fine-tuning](https://developers.openai.com/api/docs/guides/vision-fine-tuning)\n  - [Direct preference optimization](https://developers.openai.com/api/docs/guides/direct-preference-optimization)\n  - [Reinforcement fine-tuning](https://developers.openai.com/api/docs/guides/reinforcement-fine-tuning)\n  - [RFT use cases](https://developers.openai.com/api/docs/guides/rft-use-cases)\n  - [Best practices](https://developers.openai.com/api/docs/guides/fine-tuning-best-practices)\n\n- Assistants API\n\n  - [Migration guide](https://developers.openai.com/api/docs/assistants/migration)\n\n[API Dashboard](https://platform.openai.com/login)\n\n[Try ChatGPT](https://chatgpt.com/)\n\nResponses\n\nCopy Page\n\nFile input support depends on the API endpoint. The Responses API accepts the file types listed below as `input_file` items. Chat Completions accepts only PDF files as `file` content parts.\n\n| Input method | Responses API | Chat Completions |\n| --- | --- | --- |\n| Base64-encoded file data (`file_data`) | Supported file types listed below | PDF only |\n| Uploaded file ID (`file_id`) | Supported file types listed below | PDF only |\n| External file URL (`file_url`) | Supported file types listed below | Not supported |\n\nUse the Responses API for non-PDF file inputs. To use text from a file in Chat Completions, read the file in your application and send its contents as a `text` content part.\n\n## How it works\n\nIn the Responses API, `input_file` processing depends on the file type:\n\n- **PDF files**: On models with vision capabilities, such as `gpt-4o` and later models, the API extracts both text and page images and sends both to the model.\n- **Non-PDF document and text files** (for example, `.docx`, `.pptx`, `.txt`, and code files): the API extracts text only.\n- **Spreadsheet files** (for example, `.xlsx`, `.csv`, `.tsv`): the API runs a spreadsheet-specific augmentation flow (described below).\n\nUse these related tools when they better match your task:\n\n- Use [File Search](https://developers.openai.com/api/docs/guides/tools-file-search) for retrieval over large files instead of passing them directly as `input_file`.\n- Use [Hosted Shell](https://developers.openai.com/api/docs/guides/tools-shell#hosted-shell-quickstart) for spreadsheet-heavy tasks that need detailed analysis, such as aggregations, joins, charting, or custom calculations.\n\n## Non-PDF image and chart limitations\n\nFor non-PDF files, the Responses API doesn\u2019t extract embedded images or charts\ninto the model context.\n\nTo preserve chart and diagram fidelity, convert the file to PDF first, then\nsend the PDF as `input_file`.\n\n## How spreadsheet augmentation works\n\nFor spreadsheet-like files (such as `.xlsx`, `.xls`, `.csv`, `.tsv`, and\n`.iif`), the Responses API uses a spreadsheet-specific augmentation process.\n\nInstead of passing entire sheets to the model, the API parses up to the first\n1,000 rows per sheet and adds model-generated summary and header metadata so the\nmodel can work from a smaller, structured view of the data.\n\n## PDF detail levels\n\nFor PDF inputs in the Responses API, set the optional `detail` field on an\n`input_file` item to `auto`, `low`, or `high` to control how the API processes\npage images. If omitted, `detail` defaults to `auto`. For GPT-5.6 and later\nmodels, `auto` uses `high`; for earlier models, it uses `low`. Use `low` for fewer\ninput tokens, or `high` for more visual detail, such as dense charts, small print,\nor diagrams.\n\nThe `detail` setting only affects PDF page image processing. Text extracted from\nthe PDF is still included. Chat Completions file inputs don\u2019t support `detail`.\n\nA minimal Responses API request body with explicit high detail looks like this:\n\n```\n{\n  \"model\": \"gpt-4.1\",\n  \"input\": [\\\n    {\\\n      \"role\": \"user\",\\\n      \"content\": [\\\n        {\\\n          \"type\": \"input_file\",\\\n          \"filename\": \"document.pdf\",\\\n          \"file_data\": \"data:application/pdf;base64,...\",\\\n          \"detail\": \"high\"\\\n        },\\\n        {\\\n          \"type\": \"input_text\",\\\n          \"text\": \"Summarize this document.\"\\\n        }\\\n      ]\\\n    }\\\n  ]\n}\n\n\n```\n\n## Accepted file types\n\nThe following table lists common file types accepted by the Responses API as\n`input_file` items. The full list of extensions and MIME types appears later on\nthis page. Chat Completions supports only `.pdf` (`application/pdf`) for both\n`file_data` and `file_id`.\n\n| Category | Common extensions |\n| --- | --- |\n| PDF files | `.pdf` |\n| Text and code | `.txt`, `.md`, `.json`, `.html`, `.xml`, code files |\n| Rich documents | `.doc`, `.docx`, `.rtf`, `.odt` |\n| Presentations | `.ppt`, `.pptx` |\n| Spreadsheets | `.csv`, `.xls`, `.xlsx` |\n\n## File URLs\n\nYou can provide file inputs by linking external URLs.\n\nUse an external file URL\n\ncurl\n\n```\nimport OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst response = await client.responses.create({\n  model: \"gpt-6-astra\",\n  input: [\\\n    {\\\n      role: \"user\",\\\n      content: [\\\n        {\\\n          type: \"input_text\",\\\n          text: \"Analyze the letter and provide a summary of the key points.\",\\\n        },\\\n        {\\\n          type: \"input_file\",\\\n          file_url: \"https://www.berkshirehathaway.com/letters/2024ltr.pdf\",\\\n        },\\\n      ],\\\n    },\\\n  ],\n});\n\nconsole.log(response.output_text);\n```\n\n```\nfrom openai import OpenAI\n\nclient = OpenAI()\n\nresponse = client.responses.create(\n    model=\"gpt-6-astra\",\n    input=[\\\n        {\\\n            \"role\": \"user\",\\\n            \"content\": [\\\n                {\\\n                    \"type\": \"input_text\",\\\n                    \"text\": \"Analyze the letter and provide a summary of the key points.\",\\\n                },\\\n                {\\\n                    \"type\": \"input_file\",\\\n                    \"file_url\": \"https://www.berkshirehathaway.com/letters/2024ltr.pdf\",\\\n                },\\\n            ],\\\n        },\\\n    ],\n)\n\nprint(response.output_text)\n```\n\n```\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go/v3\"\n\t\"github.com/openai/openai-go/v3/responses\"\n)\n\nfunc main() {\n\tclient := openai.NewClient()\n\n\tresponse, err := client.Responses.New(context.Background(), responses.ResponseNewParams{\n\t\tModel: \"gpt-6-astra\",\n\t\tInput: responses.ResponseNewParamsInputUnion{\n\t\t\tOfInputItemList: responses.ResponseInputParam{\n\t\t\t\tresponses.ResponseInputItemParamOfMessage(\n\t\t\t\t\tresponses.ResponseInputMessageContentListParam{\n\t\t\t\t\t\tresponses.ResponseInputContentParamOfInputText(\n\t\t\t\t\t\t\t\"Analyze the letter and provide a summary of the key points.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tOfInputFile: &responses.ResponseInputFileParam{\n\t\t\t\t\t\t\t\tFileURL: openai.String(\n\t\t\t\t\t\t\t\t\t\"https://www.berkshirehathaway.com/letters/2024ltr.pdf\",\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tresponses.EasyInputMessageRoleUser,\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(response.OutputText())\n}\n```\n\n```\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.responses.ResponseCreateParams;\nimport com.openai.models.responses.ResponseInputFile;\nimport com.openai.models.responses.ResponseInputItem;\nimport java.util.List;\n\nResponseCreateParams params =\n    ResponseCreateParams.builder()\n        .model(\"gpt-6-astra\")\n        .inputOfResponse(\n            List.of(\n                ResponseInputItem.ofMessage(\n                    ResponseInputItem.Message.builder()\n                        .role(ResponseInputItem.Message.Role.USER)\n                        .addInputTextContent(\n                            \"Analyze the letter and provide a summary of the key points.\")\n                        .addContent(\n                            ResponseInputFile.builder()\n                                .fileUrl(\n                                    \"https://www.berkshirehathaway.com/letters/2024ltr.pdf\")\n                                .build())\n                        .build())))\n        .build();\n\nclient.responses().create(params).output().stream()\n    .flatMap(item -> item.message().stream())\n    .flatMap(message -> message.content().stream())\n    .flatMap(content -> content.outputText().stream())\n    .forEach(text -> System.out.println(text.text()));\n```\n\n```\nusing OpenAI.Responses;\n#pragma warning disable OPENAI001\n\nstring key = Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")!;\nResponsesClient client = new(key);\n\nUri fileUrl = new(\n    \"https://www.berkshirehathaway.com/letters/2024ltr.pdf\"\n);\n\nResponseResult response = await client.CreateResponseAsync(\n    \"gpt-6-astra\",\n    [\\\n        ResponseItem.CreateUserMessageItem(\\\n            [\\\n                ResponseContentPart.CreateInputTextPart(\\\n                    \"Analyze the letter and provide a summary of the key points.\"\\\n                ),\\\n                ResponseContentPart.CreateInputFilePart(fileUrl),\\\n            ]\\\n        ),\\\n    ]\n);\n\nConsole.WriteLine(response.GetOutputText());\n```\n\n```\nrequire \"openai\"\n\nopenai = OpenAI::Client.new\n\nresponse = openai.responses.create(\n  model: \"gpt-6-astra\",\n  input: [\\\n    {\\\n      role: \"user\",\\\n      content: [\\\n        {\\\n          type: \"input_text\",\\\n          text: \"Analyze the letter and provide a summary of the key points.\"\\\n        },\\\n        {\\\n          type: \"input_file\",\\\n          file_url: \"https://www.berkshirehathaway.com/letters/2024ltr.pdf\"\\\n        }\\\n      ]\\\n    }\\\n  ]\n)\n\nputs(response.output_text)\n```\n\n```\ncurl \"https://api.openai.com/v1/responses\" \\\n    -H \"Content-Type: application/json\" \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -d '{\n        \"model\": \"gpt-6-astra\",\n        \"input\": [\\\n            {\\\n                \"role\": \"user\",\\\n                \"content\": [\\\n                    {\\\n                        \"type\": \"input_text\",\\\n                        \"text\": \"Analyze the letter and provide a summary of the key points.\"\\\n                    },\\\n                    {\\\n                        \"type\": \"input_file\",\\\n                        \"file_url\": \"https://www.berkshirehathaway.com/letters/2024ltr.pdf\"\\\n                    }\\\n                ]\\\n            }\\\n        ]\n    }'\n```\n\nChat Completions does not support file URLs. Use the [Responses API](https://developers.openai.com/api/docs/guides/file-inputs?api-mode=responses#file-urls) for this option.\n\n## Uploading files\n\nThe following example uploads a file with the [Files API](https://developers.openai.com/api/docs/api-reference/files), then references its file ID in a request to the model.\n\nUpload a file\n\ncurl\n\n```\nimport fs from \"fs\";\nimport OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst file = await client.files.create({\n  file: fs.createReadStream(\"fixtures/draconomicon.pdf\"),\n  purpose: \"user_data\",\n});\n\nconst response = await client.responses.create({\n  model: \"gpt-6-astra\",\n  input: [\\\n    {\\\n      role: \"user\",\\\n      content: [\\\n        {\\\n          type: \"input_file\",\\\n          file_id: file.id,\\\n        },\\\n        {\\\n          type: \"input_text\",\\\n          text: \"What is the first dragon in the book?\",\\\n        },\\\n      ],\\\n    },\\\n  ],\n});\n\nconsole.log(response.output_text);\n```\n\n```\nfrom openai import OpenAI\n\nclient = OpenAI()\n\nfile = client.files.create(file=open(\"draconomicon.pdf\", \"rb\"), purpose=\"user_data\")\n\nresponse = client.responses.create(\n    model=\"gpt-6-astra\",\n    input=[\\\n        {\\\n            \"role\": \"user\",\\\n            \"content\": [\\\n                {\\\n                    \"type\": \"input_file\",\\\n                    \"file_id\": file.id,\\\n                },\\\n                {\\\n                    \"type\": \"input_text\",\\\n                    \"text\": \"What is the first dragon in the book?\",\\\n                },\\\n            ],\\\n        }\\\n    ],\n)\n\nprint(response.output_text)\n```\n\n```\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/openai/openai-go/v3\"\n\t\"github.com/openai/openai-go/v3/responses\"\n)\n\nfunc main() {\n\tclient := openai.NewClient()\n\n\tfile, err := os.Open(\"draconomicon.pdf\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer file.Close()\n\n\tuploadedFile, err := client.Files.New(context.Background(), openai.FileNewParams{\n\t\tFile:    file,\n\t\tPurpose: openai.FilePurposeUserData,\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresponse, err := client.Responses.New(context.Background(), responses.ResponseNewParams{\n\t\tModel: \"gpt-6-astra\",\n\t\tInput: responses.ResponseNewParamsInputUnion{\n\t\t\tOfInputItemList: responses.ResponseInputParam{\n\t\t\t\tresponses.ResponseInputItemParamOfMessage(\n\t\t\t\t\tresponses.ResponseInputMessageContentListParam{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tOfInputFile: &responses.ResponseInputFileParam{\n\t\t\t\t\t\t\t\tFileID: openai.String(uploadedFile.ID),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tresponses.ResponseInputContentParamOfInputText(\n\t\t\t\t\t\t\t\"What is the first dragon in the book?\",\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t\tresponses.EasyInputMessageRoleUser,\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(response.OutputText())\n}\n```\n\n```\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.files.FileCreateParams;\nimport com.openai.models.files.FilePurpose;\nimport com.openai.models.responses.ResponseCreateParams;\nimport com.openai.models.responses.ResponseInputFile;\nimport com.openai.models.responses.ResponseInputItem;\nimport java.nio.file.Path;\nimport java.util.List;\n\nvar file =\n    client\n        .files()\n        .create(\n            FileCreateParams.builder()\n                .file(Path.of(System.getenv(\"OPENAI_EXAMPLE_FILE_PATH\")))\n                .purpose(FilePurpose.USER_DATA)\n                .build());\n\nvar response =\n    client\n        .responses()\n        .create(\n            ResponseCreateParams.builder()\n                .model(\"gpt-6-astra\")\n                .inputOfResponse(\n                    List.of(\n                        ResponseInputItem.ofMessage(\n                            ResponseInputItem.Message.builder()\n                                .role(ResponseInputItem.Message.Role.USER)\n                                .addContent(\n                                    ResponseInputFile.builder().fileId(file.id()).build())\n                                .addInputTextContent(\"What is the first dragon in the book?\")\n                                .build())))\n                .build());\nresponse.output().stream()\n    .flatMap(item -> item.message().stream())\n    .flatMap(message -> message.content().stream())\n    .flatMap(content -> content.outputText().stream())\n    .forEach(text -> System.out.println(text.text()));\n```\n\n```\nusing OpenAI.Files;\nusing OpenAI.Responses;\n#pragma warning disable OPENAI001\n\nstring key = Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")!;\nResponsesClient client = new(key);\n\nOpenAIFileClient files = new(key);\n\nOpenAIFile file = await files.UploadFileAsync(\n    \"draconomicon.pdf\",\n    FileUploadPurpose.UserData\n);\n\nResponseResult response = await client.CreateResponseAsync(\n    \"gpt-6-astra\",\n    [\\\n        ResponseItem.CreateUserMessageItem(\\\n            [\\\n                ResponseContentPart.CreateInputFilePart(file.Id),\\\n                ResponseContentPart.CreateInputTextPart(\\\n                    \"What is the first dragon in the book?\"\\\n                ),\\\n            ]\\\n        ),\\\n    ]\n);\n\nConsole.WriteLine(response.GetOutputText());\n```\n\n```\nrequire \"openai\"\nrequire \"pathname\"\n\nopenai = OpenAI::Client.new\n\nfile = openai.files.create(\n  file: Pathname(\"draconomicon.pdf\"),\n  purpose: \"user_data\"\n)\n\nresponse = openai.responses.create(\n  model: \"gpt-6-astra\",\n  input: [\\\n    {\\\n      role: \"user\",\\\n      content: [\\\n        {\\\n          type: \"input_file\",\\\n          file_id: file.id\\\n        },\\\n        {\\\n          type: \"input_text\",\\\n          text: \"What is the first dragon in the book?\"\\\n        }\\\n      ]\\\n    }\\\n  ]\n)\n\nputs(response.output_text)\n```\n\n```\ncurl https://api.openai.com/v1/files \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -F purpose=\"user_data\" \\\n    -F file=\"@draconomicon.pdf\"\n\ncurl \"https://api.openai.com/v1/responses\" \\\n    -H \"Content-Type: application/json\" \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -d '{\n        \"model\": \"gpt-6-astra\",\n        \"input\": [\\\n            {\\\n                \"role\": \"user\",\\\n                \"content\": [\\\n                    {\\\n                        \"type\": \"input_file\",\\\n                        \"file_id\": \"file-6F2ksmvXxt4VdoqmHRw6kL\"\\\n                    },\\\n                    {\\\n                        \"type\": \"input_text\",\\\n                        \"text\": \"What is the first dragon in the book?\"\\\n                    }\\\n                ]\\\n            }\\\n        ]\n    }'\n```\n\nUpload a file\n\ncurl\n\n```\nimport fs from \"fs\";\nimport OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst file = await client.files.create({\n  file: fs.createReadStream(\"fixtures/draconomicon.pdf\"),\n  purpose: \"user_data\",\n});\n\nconst completion = await client.chat.completions.create({\n  model: \"gpt-6-astra\",\n  messages: [\\\n    {\\\n      role: \"user\",\\\n      content: [\\\n        {\\\n          type: \"file\",\\\n          file: {\\\n            file_id: file.id,\\\n          },\\\n        },\\\n        {\\\n          type: \"text\",\\\n          text: \"What is the first dragon in the book?\",\\\n        },\\\n      ],\\\n    },\\\n  ],\n});\n\nconsole.log(completion.choices[0].message.content);\n```\n\n```\nfrom openai import OpenAI\n\nclient = OpenAI()\n\nfile = client.files.create(file=open(\"draconomicon.pdf\", \"rb\"), purpose=\"user_data\")\n\ncompletion = client.chat.completions.create(\n    model=\"gpt-6-astra\",\n    messages=[\\\n        {\\\n            \"role\": \"user\",\\\n            \"content\": [\\\n                {\\\n                    \"type\": \"file\",\\\n                    \"file\": {\\\n                        \"file_id\": file.id,\\\n                    },\\\n                },\\\n                {\\\n                    \"type\": \"text\",\\\n                    \"text\": \"What is the first dragon in the book?\",\\\n                },\\\n            ],\\\n        }\\\n    ],\n)\n\nprint(completion.choices[0].message.content)\n```\n\n```\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/openai/openai-go/v3\"\n)\n\nfunc main() {\n\tclient := openai.NewClient()\n\n\tfile, err := os.Open(\"draconomicon.pdf\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer file.Close()\n\n\tuploadedFile, err := client.Files.New(context.Background(), openai.FileNewParams{\n\t\tFile:    file,\n\t\tPurpose: openai.FilePurposeUserData,\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tcompletion, err := client.Chat.Completions.New(context.Background(), openai.ChatCompletionNewParams{\n\t\tModel: \"gpt-6-astra\",\n\t\tMessages: []openai.ChatCompletionMessageParamUnion{\n\t\t\topenai.UserMessage([]openai.ChatCompletionContentPartUnionParam{\n\t\t\t\topenai.FileContentPart(openai.ChatCompletionContentPartFileFileParam{\n\t\t\t\t\tFileID: openai.String(uploadedFile.ID),\n\t\t\t\t}),\n\t\t\t\topenai.TextContentPart(\"What is the first dragon in the book?\"),\n\t\t\t}),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(completion.Choices[0].Message.Content)\n}\n```\n\n```\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.chat.completions.ChatCompletionContentPart;\nimport com.openai.models.chat.completions.ChatCompletionContentPartText;\nimport com.openai.models.chat.completions.ChatCompletionCreateParams;\nimport com.openai.models.chat.completions.ChatCompletionUserMessageParam;\nimport com.openai.models.files.FileCreateParams;\nimport com.openai.models.files.FilePurpose;\nimport java.nio.file.Path;\nimport java.util.List;\n\nvar file =\n    client\n        .files()\n        .create(\n            FileCreateParams.builder()\n                .file(Path.of(System.getenv(\"OPENAI_EXAMPLE_FILE_PATH\")))\n                .purpose(FilePurpose.USER_DATA)\n                .build());\n\nvar filePart =\n    ChatCompletionContentPart.ofFile(\n        ChatCompletionContentPart.File.builder()\n            .file(ChatCompletionContentPart.File.FileObject.builder().fileId(file.id()).build())\n            .build());\nvar textPart =\n    ChatCompletionContentPart.ofText(\n        ChatCompletionContentPartText.builder().text(\"Summarize this PDF.\").build());\nvar completion =\n    client\n        .chat()\n        .completions()\n        .create(\n            ChatCompletionCreateParams.builder()\n                .model(\"gpt-6-astra\")\n                .addMessage(\n                    ChatCompletionUserMessageParam.builder()\n                        .contentOfArrayOfContentParts(List.of(filePart, textPart))\n                        .build())\n                .build());\ncompletion.choices().stream()\n    .flatMap(choice -> choice.message().content().stream())\n    .forEach(System.out::println);\n```\n\n```\nusing OpenAI.Chat;\nusing OpenAI.Files;\n#pragma warning disable OPENAI001\n\nstring key = Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")!;\nstring model = \"gpt-6-astra\";\nChatClient client = new(model, key);\n\nOpenAIFileClient files = new(key);\n\nOpenAIFile file = await files.UploadFileAsync(\"draconomicon.pdf\", FileUploadPurpose.UserData);\n\nChatCompletion completion = await client.CompleteChatAsync(\n    new UserChatMessage(\n        [\\\n            ChatMessageContentPart.CreateFilePart(file.Id),\\\n            ChatMessageContentPart.CreateTextPart(\"What is the first dragon in the book?\"),\\\n        ]\n    )\n);\n\nConsole.WriteLine(completion.Content[0].Text);\n```\n\n```\nrequire \"openai\"\nrequire \"pathname\"\n\nclient = OpenAI::Client.new\nfile = client.files.create(\n  file: Pathname(\"draconomicon.pdf\"),\n  purpose: :user_data\n)\ncompletion = client.chat.completions.create(\n  model: \"gpt-6-astra\",\n  messages: [\\\n    {\\\n      role: :user,\\\n      content: [\\\n        {\\\n          type: :file,\\\n          file: { file_id: file.id }\\\n        },\\\n        {\\\n          type: :text,\\\n          text: \"Summarize this PDF.\"\\\n        }\\\n      ]\\\n    }\\\n  ]\n)\n\nputs(completion.choices.fetch(0).message.content)\n```\n\n```\ncurl https://api.openai.com/v1/files \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -F purpose=\"user_data\" \\\n    -F file=\"@draconomicon.pdf\"\n\ncurl \"https://api.openai.com/v1/chat/completions\" \\\n    -H \"Content-Type: application/json\" \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -d '{\n        \"model\": \"gpt-6-astra\",\n        \"messages\": [\\\n            {\\\n                \"role\": \"user\",\\\n                \"content\": [\\\n                    {\\\n                        \"type\": \"file\",\\\n                        \"file\": {\\\n                            \"file_id\": \"file-6F2ksmvXxt4VdoqmHRw6kL\"\\\n                        }\\\n                    },\\\n                    {\\\n                        \"type\": \"text\",\\\n                        \"text\": \"What is the first dragon in the book?\"\\\n                    }\\\n                ]\\\n            }\\\n        ]\n    }'\n```\n\n## Base64-encoded files\n\nYou can also send file inputs as Base64-encoded file data.\n\nSend a Base64-encoded file\n\ncurl\n\n```\nimport fs from \"fs\";\nimport OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst data = fs.readFileSync(\"fixtures/draconomicon.pdf\");\nconst base64String = data.toString(\"base64\");\n\nconst response = await client.responses.create({\n  model: \"gpt-6-astra\",\n  input: [\\\n    {\\\n      role: \"user\",\\\n      content: [\\\n        {\\\n          type: \"input_file\",\\\n          filename: \"draconomicon.pdf\",\\\n          file_data: `data:application/pdf;base64,${base64String}`,\\\n        },\\\n        {\\\n          type: \"input_text\",\\\n          text: \"What is the first dragon in the book?\",\\\n        },\\\n      ],\\\n    },\\\n  ],\n});\n\nconsole.log(response.output_text);\n```\n\n```\nimport base64\nfrom openai import OpenAI\n\nclient = OpenAI()\n\nwith open(\"draconomicon.pdf\", \"rb\") as f:\n    data = f.read()\n\nbase64_string = base64.b64encode(data).decode(\"utf-8\")\n\nresponse = client.responses.create(\n    model=\"gpt-6-astra\",\n    input=[\\\n        {\\\n            \"role\": \"user\",\\\n            \"content\": [\\\n                {\\\n                    \"type\": \"input_file\",\\\n                    \"filename\": \"draconomicon.pdf\",\\\n                    \"file_data\": f\"data:application/pdf;base64,{base64_string}\",\\\n                },\\\n                {\\\n                    \"type\": \"input_text\",\\\n                    \"text\": \"What is the first dragon in the book?\",\\\n                },\\\n            ],\\\n        },\\\n    ],\n)\n\nprint(response.output_text)\n```\n\n```\npackage main\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/openai/openai-go/v3\"\n\t\"github.com/openai/openai-go/v3/responses\"\n)\n\nfunc main() {\n\tclient := openai.NewClient()\n\n\tdata, err := os.ReadFile(\"draconomicon.pdf\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfileData := \"data:application/pdf;base64,\" + base64.StdEncoding.EncodeToString(data)\n\n\tresponse, err := client.Responses.New(context.Background(), responses.ResponseNewParams{\n\t\tModel: \"gpt-6-astra\",\n\t\tInput: responses.ResponseNewParamsInputUnion{\n\t\t\tOfInputItemList: responses.ResponseInputParam{\n\t\t\t\tresponses.ResponseInputItemParamOfMessage(\n\t\t\t\t\tresponses.ResponseInputMessageContentListParam{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tOfInputFile: &responses.ResponseInputFileParam{\n\t\t\t\t\t\t\t\tFilename: openai.String(\"draconomicon.pdf\"),\n\t\t\t\t\t\t\t\tFileData: openai.String(fileData),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tresponses.ResponseInputContentParamOfInputText(\n\t\t\t\t\t\t\t\"What is the first dragon in the book?\",\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t\tresponses.EasyInputMessageRoleUser,\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(response.OutputText())\n}\n```\n\n```\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.responses.ResponseCreateParams;\nimport com.openai.models.responses.ResponseInputFile;\nimport com.openai.models.responses.ResponseInputItem;\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.Base64;\nimport java.util.List;\n\nString pdfData =\n    Base64.getEncoder()\n        .encodeToString(Files.readAllBytes(Path.of(System.getenv(\"OPENAI_EXAMPLE_FILE_PATH\"))));\nResponseCreateParams params =\n    ResponseCreateParams.builder()\n        .model(\"gpt-6-astra\")\n        .inputOfResponse(\n            List.of(\n                ResponseInputItem.ofMessage(\n                    ResponseInputItem.Message.builder()\n                        .role(ResponseInputItem.Message.Role.USER)\n                        .addContent(\n                            ResponseInputFile.builder()\n                                .filename(\"document.pdf\")\n                                .fileData(\"data:application/pdf;base64,\" + pdfData)\n                                .build())\n                        .addInputTextContent(\"Summarize this document.\")\n                        .build())))\n        .build();\n\nclient.responses().create(params).output().stream()\n    .flatMap(item -> item.message().stream())\n    .flatMap(message -> message.content().stream())\n    .flatMap(content -> content.outputText().stream())\n    .forEach(text -> System.out.println(text.text()));\n```\n\n```\nusing OpenAI.Responses;\n#pragma warning disable OPENAI001\n\nstring key = Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")!;\nResponsesClient client = new(key);\n\nBinaryData fileBytes = BinaryData.FromBytes(await File.ReadAllBytesAsync(\"draconomicon.pdf\"));\nResponseResult response = await client.CreateResponseAsync(\n    \"gpt-6-astra\",\n    [\\\n        ResponseItem.CreateUserMessageItem(\\\n            [\\\n                ResponseContentPart.CreateInputFilePart(\\\n                    fileBytes,\\\n                    \"application/pdf\",\\\n                    \"draconomicon.pdf\"\\\n                ),\\\n                ResponseContentPart.CreateInputTextPart(\\\n                    \"What is the first dragon in the book?\"\\\n                ),\\\n            ]\\\n        ),\\\n    ]\n);\n\nConsole.WriteLine(response.GetOutputText());\n```\n\n```\nrequire \"base64\"\nrequire \"openai\"\n\nclient = OpenAI::Client.new\npdf_data = Base64.strict_encode64(File.binread(\"draconomicon.pdf\"))\nresponse = client.responses.create(\n  model: \"gpt-6-astra\",\n  input: [\\\n    {\\\n      role: :user,\\\n      content: [\\\n        {\\\n          type: :input_file,\\\n          filename: \"document.pdf\",\\\n          file_data: \"data:application/pdf;base64,#{pdf_data}\"\\\n        },\\\n        {\\\n          type: :input_text,\\\n          text: \"Summarize this document.\"\\\n        }\\\n      ]\\\n    }\\\n  ]\n)\n\nputs(response.output_text)\n```\n\n```\ncurl \"https://api.openai.com/v1/responses\" \\\n    -H \"Content-Type: application/json\" \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -d '{\n        \"model\": \"gpt-6-astra\",\n        \"input\": [\\\n            {\\\n                \"role\": \"user\",\\\n                \"content\": [\\\n                    {\\\n                        \"type\": \"input_file\",\\\n                        \"filename\": \"draconomicon.pdf\",\\\n                        \"file_data\": \"...base64 encoded PDF bytes here...\"\\\n                    },\\\n                    {\\\n                        \"type\": \"input_text\",\\\n                        \"text\": \"What is the first dragon in the book?\"\\\n                    }\\\n                ]\\\n            }\\\n        ]\n    }'\n```\n\nSend a Base64-encoded file\n\ncurl\n\n```\nimport fs from \"fs\";\nimport OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst data = fs.readFileSync(\"fixtures/draconomicon.pdf\");\nconst base64String = data.toString(\"base64\");\n\nconst completion = await client.chat.completions.create({\n  model: \"gpt-6-astra\",\n  messages: [\\\n    {\\\n      role: \"user\",\\\n      content: [\\\n        {\\\n          type: \"file\",\\\n          file: {\\\n            filename: \"draconomicon.pdf\",\\\n            file_data: `data:application/pdf;base64,${base64String}`,\\\n          },\\\n        },\\\n        {\\\n          type: \"text\",\\\n          text: \"What is the first dragon in the book?\",\\\n        },\\\n      ],\\\n    },\\\n  ],\n});\n\nconsole.log(completion.choices[0].message.content);\n```\n\n```\nimport base64\nfrom openai import OpenAI\n\nclient = OpenAI()\n\nwith open(\"draconomicon.pdf\", \"rb\") as f:\n    data = f.read()\n\nbase64_string = base64.b64encode(data).decode(\"utf-8\")\n\ncompletion = client.chat.completions.create(\n    model=\"gpt-6-astra\",\n    messages=[\\\n        {\\\n            \"role\": \"user\",\\\n            \"content\": [\\\n                {\\\n                    \"type\": \"file\",\\\n                    \"file\": {\\\n                        \"filename\": \"draconomicon.pdf\",\\\n                        \"file_data\": f\"data:application/pdf;base64,{base64_string}\",\\\n                    },\\\n                },\\\n                {\\\n                    \"type\": \"text\",\\\n                    \"text\": \"What is the first dragon in the book?\",\\\n                },\\\n            ],\\\n        },\\\n    ],\n)\n\nprint(completion.choices[0].message.content)\n```\n\n```\npackage main\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/openai/openai-go/v3\"\n)\n\nfunc main() {\n\tclient := openai.NewClient()\n\n\tdata, err := os.ReadFile(\"draconomicon.pdf\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfileData := \"data:application/pdf;base64,\" + base64.StdEncoding.EncodeToString(data)\n\n\tcompletion, err := client.Chat.Completions.New(context.Background(), openai.ChatCompletionNewParams{\n\t\tModel: \"gpt-6-astra\",\n\t\tMessages: []openai.ChatCompletionMessageParamUnion{\n\t\t\topenai.UserMessage([]openai.ChatCompletionContentPartUnionParam{\n\t\t\t\topenai.FileContentPart(openai.ChatCompletionContentPartFileFileParam{\n\t\t\t\t\tFilename: openai.String(\"draconomicon.pdf\"),\n\t\t\t\t\tFileData: openai.String(fileData),\n\t\t\t\t}),\n\t\t\t\topenai.TextContentPart(\"What is the first dragon in the book?\"),\n\t\t\t}),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(completion.Choices[0].Message.Content)\n}\n```\n\n```\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.chat.completions.ChatCompletionContentPart;\nimport com.openai.models.chat.completions.ChatCompletionContentPartText;\nimport com.openai.models.chat.completions.ChatCompletionCreateParams;\nimport com.openai.models.chat.completions.ChatCompletionUserMessageParam;\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.Base64;\nimport java.util.List;\n\nString encoded =\n    Base64.getEncoder()\n        .encodeToString(Files.readAllBytes(Path.of(System.getenv(\"OPENAI_EXAMPLE_FILE_PATH\"))));\nChatCompletionContentPart file =\n    ChatCompletionContentPart.ofFile(\n        ChatCompletionContentPart.File.builder()\n            .file(\n                ChatCompletionContentPart.File.FileObject.builder()\n                    .filename(\"document.pdf\")\n                    .fileData(\"data:application/pdf;base64,\" + encoded)\n                    .build())\n            .build());\nChatCompletionContentPart text =\n    ChatCompletionContentPart.ofText(\n        ChatCompletionContentPartText.builder().text(\"Summarize this document.\").build());\n\nChatCompletionCreateParams params =\n    ChatCompletionCreateParams.builder()\n        .model(\"gpt-6-astra\")\n        .addMessage(\n            ChatCompletionUserMessageParam.builder()\n                .contentOfArrayOfContentParts(List.of(file, text))\n                .build())\n        .build();\n\nclient.chat().completions().create(params).choices().stream()\n    .flatMap(choice -> choice.message().content().stream())\n    .forEach(System.out::println);\n```\n\n```\nusing OpenAI.Chat;\n#pragma warning disable OPENAI001\n\nstring key = Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")!;\nstring model = \"gpt-6-astra\";\nChatClient client = new(model, key);\n\nBinaryData fileBytes = BinaryData.FromBytes(await File.ReadAllBytesAsync(\"draconomicon.pdf\"));\nChatCompletion completion = await client.CompleteChatAsync(\n    new UserChatMessage(\n        [\\\n            ChatMessageContentPart.CreateFilePart(\\\n                fileBytes,\\\n                \"application/pdf\",\\\n                \"draconomicon.pdf\"\\\n            ),\\\n            ChatMessageContentPart.CreateTextPart(\"What is the first dragon in the book?\"),\\\n        ]\n    )\n);\n\nConsole.WriteLine(completion.Content[0].Text);\n```\n\n```\nrequire \"base64\"\nrequire \"openai\"\n\nclient = OpenAI::Client.new\npdf_data = Base64.strict_encode64(File.binread(\"draconomicon.pdf\"))\ncompletion = client.chat.completions.create(\n  model: \"gpt-6-astra\",\n  messages: [\\\n    {\\\n      role: :user,\\\n      content: [\\\n        {\\\n          type: :file,\\\n          file: {\\\n            filename: \"document.pdf\",\\\n            file_data: \"data:application/pdf;base64,#{pdf_data}\"\\\n          }\\\n        },\\\n        {\\\n          type: :text,\\\n          text: \"Summarize this document.\"\\\n        }\\\n      ]\\\n    }\\\n  ]\n)\n\nputs(completion.choices.fetch(0).message.content)\n```\n\n```\ncurl \"https://api.openai.com/v1/chat/completions\" \\\n    -H \"Content-Type: application/json\" \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -d '{\n        \"model\": \"gpt-6-astra\",\n        \"messages\": [\\\n            {\\\n                \"role\": \"user\",\\\n                \"content\": [\\\n                    {\\\n                        \"type\": \"file\",\\\n                        \"file\": {\\\n                            \"filename\": \"draconomicon.pdf\",\\\n                            \"file_data\": \"...base64 encoded bytes here...\"\\\n                        }\\\n                    },\\\n                    {\\\n                        \"type\": \"text\",\\\n                        \"text\": \"What is the first dragon in the book?\"\\\n                    }\\\n                ]\\\n            }\\\n        ]\n    }'\n```\n\n## Usage considerations\n\nKeep these constraints in mind when you use file inputs:\n\n- **Token usage:** PDF parsing includes both extracted text and page images in context, which can increase token usage. In the Responses API, set `detail` to `auto` (the default), `low`, or `high` to control the amount of visual detail for PDF page images. Before deploying at scale, review pricing and token implications. [More on pricing](https://developers.openai.com/api/docs/pricing).\n- **File size limits:** A single request can include more than one file, but each file must be under 50 MB. The combined limit across all files in the request is 50 MB.\n- **Supported models:** PDF parsing that includes text and page images requires models with vision capabilities, such as `gpt-4o` and later models.\n- **File upload purpose:** You can upload files with any supported [purpose](https://developers.openai.com/api/docs/api-reference/files/create#files-create-purpose), but use `user_data` for files you plan to pass as model inputs.\n\n## Full list of accepted file types\n\nThis list applies to the Responses API. Chat Completions supports only `.pdf`\n(`application/pdf`) for both `file_data` and `file_id`.\n\n| Category | Extensions | MIME types |\n| --- | --- | --- |\n| PDF files | PDF files (`.pdf`) | `application/pdf` |\n| Spreadsheets | Excel sheets (`.xla`, `.xlb`, `.xlc`, `.xlm`, `.xls`, `.xlsx`, `.xlt`, `.xlw`) | `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`, `application/vnd.ms-excel` |\n| Spreadsheets | CSV / TSV / IIF (`.csv`, `.tsv`, `.iif`), Google Sheets | `text/csv`, `application/csv`, `text/tsv`, `text/x-iif`, `application/x-iif`, `application/vnd.google-apps.spreadsheet` |\n| Rich documents | Word/ODT/RTF docs (`.doc`, `.docx`, `.dot`, `.odt`, `.rtf`), Pages, Google Docs | `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `application/msword`, `application/rtf`, `text/rtf`, `application/vnd.oasis.opendocument.text`, `application/vnd.apple.pages`, `application/vnd.google-apps.document`, `application/vnd.apple.iwork` |\n| Presentations | PowerPoint slides (`.pot`, `.ppa`, `.pps`, `.ppt`, `.pptx`, `.pwz`, `.wiz`), Keynote, Google Slides | `application/vnd.openxmlformats-officedocument.presentationml.presentation`, `application/vnd.ms-powerpoint`, `application/vnd.apple.keynote`, `application/vnd.google-apps.presentation`, `application/vnd.apple.iwork` |\n| Text and code | Text/code formats (`.asm`, `.bat`, `.c`, `.cc`, `.conf`, `.cpp`, `.css`, `.cxx`, `.def`, `.dic`, `.eml`, `.h`, `.hh`, `.htm`, `.html`, `.ics`, `.ifb`, `.in`, `.js`, `.json`, `.ksh`, `.list`, `.log`, `.markdown`, `.md`, `.mht`, `.mhtml`, `.mime`, `.mjs`, `.nws`, `.pl`, `.py`, `.rst`, `.s`, `.sql`, `.srt`, `.text`, `.txt`, `.vcf`, `.vtt`, `.xml`) | `application/javascript`, `application/typescript`, `text/xml`, `text/x-shellscript`, `text/x-rst`, `text/x-makefile`, `text/x-lisp`, `text/x-asm`, `text/vbscript`, `text/css`, `message/rfc822`, `application/x-sql`, `application/x-scala`, `application/x-rust`, `application/x-powershell`, `text/x-diff`, `text/x-patch`, `application/x-patch`, `text/plain`, `text/markdown`, `text/x-java`, `text/x-script.python`, `text/x-python`, `text/x-c`, `text/x-c++`, `text/x-golang`, `text/html`, `text/x-php`, `application/x-php`, `application/x-httpd-php`, `application/x-httpd-php-source`, `text/x-ruby`, `text/x-sh`, `text/x-bash`, `application/x-bash`, `text/x-zsh`, `text/x-tex`, `text/x-csharp`, `application/json`, `text/x-typescript`, `text/javascript`, `text/x-go`, `text/x-rust`, `text/x-scala`, `text/x-kotlin`, `text/x-swift`, `text/x-lua`, `text/x-r`, `text/x-R`, `text/x-julia`, `text/x-perl`, `text/x-objectivec`, `text/x-objectivec++`, `text/x-erlang`, `text/x-elixir`, `text/x-haskell`, `text/x-clojure`, `text/x-groovy`, `text/x-dart`, `text/x-awk`, `application/x-awk`, `text/jsx`, `text/tsx`, `text/x-handlebars`, `text/x-mustache`, `text/x-ejs`, `text/x-jinja2`, `text/x-liquid`, `text/x-erb`, `text/x-twig`, `text/x-pug`, `text/x-jade`, `text/x-tmpl`, `text/x-cmake`, `text/x-dockerfile`, `text/x-gradle`, `text/x-ini`, `text/x-properties`, `text/x-protobuf`, `application/x-protobuf`, `text/x-sql`, `text/x-sass`, `text/x-scss`, `text/x-less`, `text/x-hcl`, `text/x-terraform`, `application/x-terraform`, `text/x-toml`, `application/x-toml`, `application/graphql`, `application/x-graphql`, `text/x-graphql`, `application/x-ndjson`, `application/json5`, `application/x-json5`, `text/x-yaml`, `application/toml`, `application/x-yaml`, `application/yaml`, `text/x-astro`, `text/srt`, `application/x-subrip`, `text/x-subrip`, `text/vtt`, `text/x-vcard`, `text/calendar` |\n\n## Next steps\n\nNext, you might want to explore one of these resources:\n\n[Experiment with file inputs in the Playground\\\\\n\\\\\nUse the Playground to develop and iterate on prompts with file inputs.](https://platform.openai.com/chat/edit)\n\n[Full API reference\\\\\n\\\\\nCheck out the API reference for more options.](https://developers.openai.com/api/docs/api-reference/responses)\n\n[Use File Search for large corpora\\\\\n\\\\\nUse retrieval over chunked files when you need scalable search instead of\\\\\nsending whole files in a single context window.](https://developers.openai.com/api/docs/guides/tools-file-search)\n\n[Use Hosted Shell for deep spreadsheet analysis\\\\\n\\\\\nUse Hosted Shell for advanced spreadsheet workflows such as joins,\\\\\naggregations, and charting.](https://developers.openai.com/api/docs/guides/tools-shell#hosted-shell-quickstart)\n\nAsk AI\n\nLoading docs agent...",
      "content_chars": 44080,
      "published_date": null
    },
    {
      "rank": 10,
      "url": "https://community.openai.com/t/20-files-per-assistant-clarification/479659",
      "title": "20 files per assistant clarification - API - OpenAI Developer ...",
      "content": "[Skip to last reply](https://community.openai.com/t/20-files-per-assistant-clarification/479659/16) [Skip to top](https://community.openai.com/t/20-files-per-assistant-clarification/479659/1)\n\n[Skip to main content](https://community.openai.com/t/20-files-per-assistant-clarification/479659#main-container)\n\n# [20 files per assistant clarification](https://community.openai.com/t/20-files-per-assistant-clarification/479659)\n\n[API](https://community.openai.com/c/api/7)\n\n- [api](https://community.openai.com/tag/api/33)\n\nYou have selected **0** posts.\n\n[select all](https://community.openai.com/t/20-files-per-assistant-clarification/479659)\n\n[cancel selecting](https://community.openai.com/t/20-files-per-assistant-clarification/479659)\n\n9.3k\nviews\n12\nlikes\n12\nusers\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/darcschnider/48/190437_2.png)3](https://community.openai.com/u/darcschnider \"darcschnider\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/excelformulabot.com/48/11306_2.png)2](https://community.openai.com/u/excelformulabot.com \"excelformulabot.com\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/somebodysysop/48/17613_2.png)2](https://community.openai.com/u/SomebodySysop \"SomebodySysop\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/john_g/48/146819_2.png)](https://community.openai.com/u/John_G \"John_G\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/benjamin1254/48/237414_2.png)](https://community.openai.com/u/benjamin1254 \"benjamin1254\")\n\nread\n4\nmin\n\n\nSummarize\n\n[Nov 2023](https://community.openai.com/t/20-files-per-assistant-clarification/479659/1 \"Jump to the first post\")\n\n1 / 16\n\n\nNov 2023\n\n\n[Nov 2023](https://community.openai.com/t/20-files-per-assistant-clarification/479659/16)\n\n## post by excelformulabot.com on Nov 7, 2023\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/excelformulabot.com/48/11306_2.png)](https://community.openai.com/u/excelformulabot.com)\n\n[excelformulabot.com](https://community.openai.com/u/excelformulabot.com)\n\n[Nov 2023](https://community.openai.com/t/20-files-per-assistant-clarification/479659 \"Post date\")\n\n\u201cYou can attach a maximum of 20 files per Assistant, and they can be at most 512 MB each.\u201d\n\nCan someone clarify this for me?\n\nI should technically be able to have one assistant with the same instruction and model power thousands of threads.\n\nIf anything, I\u2019d think the file limit would be at the thread level, not the assistant.\n\nMy app allows users to upload their own files, thus this wouldn\u2019t be a scalable solution.\n\nMe too\n\n9.3k\nviews\n12\nlikes\n12\nusers\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/darcschnider/48/190437_2.png)3](https://community.openai.com/u/darcschnider \"darcschnider\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/excelformulabot.com/48/11306_2.png)2](https://community.openai.com/u/excelformulabot.com \"excelformulabot.com\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/somebodysysop/48/17613_2.png)2](https://community.openai.com/u/SomebodySysop \"SomebodySysop\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/john_g/48/146819_2.png)](https://community.openai.com/u/John_G \"John_G\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/benjamin1254/48/237414_2.png)](https://community.openai.com/u/benjamin1254 \"benjamin1254\")\n\nread\n4\nmin\n\n\nSummarize\n\n## post by ryandetzel on Nov 7, 2023\n\n## post by excelformulabot.com on Nov 7, 2023\n\n## post by benjamin1254 on Nov 7, 2023\n\n## post by darcschnider on Nov 7, 2023\n\n## post by lombax85 on Nov 7, 2023\n\n## post by darcschnider on Nov 7, 2023\n\n## post by alden on Nov 8, 2023\n\n## post by John\\_G on Nov 8, 2023\n\n## post by joshg on Nov 8, 2023\n\n## post by SomebodySysop on Nov 8, 2023\n\n## post by SomebodySysop on Nov 8, 2023\n\n## post by darcschnider on Nov 10, 2023\n\n## post by yazoooo on Nov 12, 2023\n\n## post by christian.lembke on Nov 12, 2023\n\n## post by Rabble on Nov 15, 2023\n\nReply\n\n### Related topics\n\n| Topic | Replies | Views | Activity |\n| --- | --- | --- | --- |\n| [AI assistants file limits](https://community.openai.com/t/ai-assistants-file-limits/566434)<br>[API](https://community.openai.com/c/api/7) <br>- [assistants-api](https://community.openai.com/tag/assistants-api/355) | [10](https://community.openai.com/t/ai-assistants-file-limits/566434/1) | 13.9k | [Oct 2024](https://community.openai.com/t/ai-assistants-file-limits/566434/11) |\n| [Failed to index file File contains too may tokens. Max allowed tokens per file is 2000000](https://community.openai.com/t/failed-to-index-file-file-contains-too-may-tokens-max-allowed-tokens-per-file-is-2000000/512298)<br>[API](https://community.openai.com/c/api/7) <br>- [api](https://community.openai.com/tag/api/33),<br>- [assistants](https://community.openai.com/tag/assistants/345) | [22](https://community.openai.com/t/failed-to-index-file-file-contains-too-may-tokens-max-allowed-tokens-per-file-is-2000000/512298/1) | 5.0k | [Mar 2024](https://community.openai.com/t/failed-to-index-file-file-contains-too-may-tokens-max-allowed-tokens-per-file-is-2000000/512298/23) |\n| [New \u201cAssistants\u201d API a potential replacement for low level \u201cRAG\u201d style content generation?](https://community.openai.com/t/new-assistants-api-a-potential-replacement-for-low-level-rag-style-content-generation/475677)<br>[API](https://community.openai.com/c/api/7) | [9](https://community.openai.com/t/new-assistants-api-a-potential-replacement-for-low-level-rag-style-content-generation/475677/1) | 9.0k | [Mar 2024](https://community.openai.com/t/new-assistants-api-a-potential-replacement-for-low-level-rag-style-content-generation/475677/10) |\n| [In Assistants, Is there a limit to File size and number of files?](https://community.openai.com/t/in-assistants-is-there-a-limit-to-file-size-and-number-of-files/477422)<br>[API](https://community.openai.com/c/api/7) | [6](https://community.openai.com/t/in-assistants-is-there-a-limit-to-file-size-and-number-of-files/477422/1) | 9.3k | [Nov 2023](https://community.openai.com/t/in-assistants-is-there-a-limit-to-file-size-and-number-of-files/477422/7) |\n| [Assistants Bugs in Playground](https://community.openai.com/t/assistants-bugs-in-playground/476549)<br>[Bugs](https://community.openai.com/c/api/bugs/30) <br>- [assistants](https://community.openai.com/tag/assistants/345),<br>- [threads](https://community.openai.com/tag/threads/352) | [32](https://community.openai.com/t/assistants-bugs-in-playground/476549/1) | 5.5k | [Nov 2023](https://community.openai.com/t/assistants-bugs-in-playground/476549/33) |\n\nTopic list, column headers with buttons are sortable.\n\nDeveloper Community\n\n\nConnect with other developers building with the OpenAI Platform.\n\n\nHelp\n\n\n- [Support](https://help.openai.com/en/articles/6614161-how-can-i-contact-support)\n\nDeveloper Resources\n\n\n- [API Documentation](https://platform.openai.com/overview)\n- [Service status](https://status.openai.com/)\n- [Cookbook](https://github.com/openai/openai-cookbook)\n\n[Terms & policies](https://openai.com/policies) [Privacy policy](https://openai.com/policies/privacy-policy)",
      "content_chars": 7330,
      "published_date": "2023-11-07T18:24:06"
    }
  ],
  "answer_text": null,
  "citations": [],
  "raw_response": {
    "results": {
      "web": [
        {
          "url": "https://developers.openai.com/api/reference/resources/files/methods/create",
          "title": "Upload file | OpenAI API Reference",
          "description": "Individual files can be up to 512 MB, and each project can store up to 2.5 TB of files in total. There is no organization-wide storage limit. Uploads to this endpoint are rate-limited to 1,000 requests per minute per authenticated user. The Assistants API supports files up to 2 million tokens ...",
          "favicon_url": "https://you.com/favicon?domain=developers.openai.com&size=128",
          "snippets": [
            "Individual files can be up to 512 MB, and each project can store up to 2.5 TB of files in total. There is no organization-wide storage limit. Uploads to this endpoint are rate-limited to 1,000 requests per minute per authenticated user. The Assistants API supports files up to 2 million tokens and of specific file types.",
            "The number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days). ... The File object represents a document that has been uploaded to OpenAI. ... The file identifier, which can be referenced in the API endpoints. ... The size of the file, in bytes.",
            "The Batch API only supports .jsonl files up to 200 MB in size. The input also has a specific required format. For Retrieval or file_search ingestion, upload files here first. If you need to attach multiple uploaded files to the same vector store, use /vector_stores/{vector_store_id}/file_batches instead of attaching them one by one.",
            "Please contact us if you need to increase these storage limits. ... The File object (not file name) to be uploaded. purpose: \"assistants\" or \"batch\" or \"fine-tune\" or 3 more \u00b7 The intended purpose of the uploaded file. One of: ... The expiration policy for a file. By default, files with purpose=batch expire after 30 days and all other files are persisted until they are manually deleted."
          ],
          "contents": {
            "markdown": "[Skip to content](https://developers.openai.com/api/reference/resources/files/methods/create#_top)\n\nFor the complete documentation index, see [llms.txt](https://developers.openai.com/llms.txt). Markdown versions of documentation pages are available by appending\n`.md` to the page URL.\n\n[API Reference](https://developers.openai.com/api/reference)\n\n[Files](https://developers.openai.com/api/reference/resources/files)\n\nCopy Markdown\n\nOpen in **ChatGPT**\n\n* * *\n\n**Copy Markdown**\n\n**View as Markdown**\n\n# Upload file\n\nPOST/files\n\nUpload a file that can be used across various endpoints. Individual files\ncan be up to 512 MB, and each project can store up to 2.5 TB of files in\ntotal. There is no organization-wide storage limit. Uploads to this\nendpoint are rate-limited to 1,000 requests per minute per authenticated\nuser.\n\n- The Assistants API supports files up to 2 million tokens and of specific\nfile types. See the [Assistants Tools guide](https://developers.openai.com/api/docs/guides/tools) for\ndetails.\n- The Fine-tuning API only supports `.jsonl` files. The input also has\ncertain required formats for fine-tuning\n[chat](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) or\n[completions](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#formatting-your-data) models.\n- The Batch API only supports `.jsonl` files up to 200 MB in size. The input\nalso has a specific required\n[format](https://developers.openai.com/api/docs/guides/batch#1-prepare-your-batch-file).\n- For Retrieval or `file_search` ingestion, upload files here first. If\nyou need to attach multiple uploaded files to the same vector store, use\n[`/vector_stores/{vector_store_id}/file_batches`](https://developers.openai.com/api/reference/resources/vector_stores/subresources/file_batches/methods/create)\ninstead of attaching them one by one. Vector store attachment has separate\nlimits from file upload, including 2,000 attached files per minute per\norganization.\n\nPlease [contact us](https://help.openai.com/) if you need to increase these\nstorage limits.\n\n##### Body ParametersForm DataExpand Collapse\n\nfile: file\n\nThe File object (not file name) to be uploaded.\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20file%20%3E%20(schema))\n\npurpose: \"assistants\"or\"batch\"or\"fine-tune\"or3 more\n\nThe intended purpose of the uploaded file. One of:\n\n- `assistants`: Used in the Assistants API\n- `batch`: Used in the Batch API\n- `fine-tune`: Used for fine-tuning\n- `vision`: Images used for vision fine-tuning\n- `user_data`: Flexible file type for any purpose\n- `evals`: Used for eval data sets\n\nOne of the following:\n\n\"assistants\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20purpose%20%3E%20(schema)%20%3E%20(member)%200)\n\n\"batch\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20purpose%20%3E%20(schema)%20%3E%20(member)%201)\n\n\"fine-tune\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20purpose%20%3E%20(schema)%20%3E%20(member)%202)\n\n\"vision\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20purpose%20%3E%20(schema)%20%3E%20(member)%203)\n\n\"user\\_data\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20purpose%20%3E%20(schema)%20%3E%20(member)%204)\n\n\"evals\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20purpose%20%3E%20(schema)%20%3E%20(member)%205)\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20purpose%20%3E%20(schema))\n\nexpires\\_after: optional object {anchor, seconds}\n\nThe expiration policy for a file. By default, files with `purpose=batch` expire after 30 days and all other files are persisted until they are manually deleted.\n\nanchor: \"created\\_at\"\n\nAnchor timestamp after which the expiration policy applies. Supported anchors: `created_at`.\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20expires_after%20%3E%20(schema)%20%3E%20(property)%20anchor)\n\nseconds: number\n\nThe number of seconds after the anchor time that the file will expire. Must be between 3600 (1 hour) and 2592000 (30 days).\n\nformatint64\n\nminimum3600\n\nmaximum2592000\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20expires_after%20%3E%20(schema)%20%3E%20(property)%20seconds)\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(method)%20create%20%3E%20(params)%200%20%3E%20(param)%20expires_after%20%3E%20(schema))\n\n##### ReturnsExpand Collapse\n\nFileObjectobject {id, bytes, created\\_at, 6 more}\n\nThe `File` object represents a document that has been uploaded to OpenAI.\n\nid: string\n\nThe file identifier, which can be referenced in the API endpoints.\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20id)\n\nbytes: number\n\nThe size of the file, in bytes.\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20bytes)\n\ncreated\\_at: number\n\nThe Unix timestamp (in seconds) for when the file was created.\n\nformatunixtime\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20created_at)\n\nfilename: string\n\nThe name of the file.\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20filename)\n\nobject: \"file\"\n\nThe object type, which is always `file`.\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20object)\n\npurpose: \"assistants\"or\"assistants\\_output\"or\"batch\"or5 more\n\nThe intended purpose of the file. Supported values are `assistants`, `assistants_output`, `batch`, `batch_output`, `fine-tune`, `fine-tune-results`, `vision`, and `user_data`.\n\nOne of the following:\n\n\"assistants\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%200)\n\n\"assistants\\_output\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%201)\n\n\"batch\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%202)\n\n\"batch\\_output\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%203)\n\n\"fine-tune\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%204)\n\n\"fine-tune-results\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%205)\n\n\"vision\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%206)\n\n\"user\\_data\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose%20%3E%20(member)%207)\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20purpose)\n\nDeprecatedstatus: \"uploaded\"or\"processed\"or\"error\"\n\nDeprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.\n\nOne of the following:\n\n\"uploaded\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%200)\n\n\"processed\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%201)\n\n\"error\"\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20status%20%3E%20(member)%202)\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20status)\n\nexpires\\_at: optional number\n\nThe Unix timestamp (in seconds) for when the file will expire.\n\nformatunixtime\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20expires_at)\n\nDeprecatedstatus\\_details: optional string\n\nDeprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`.\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema)%20%3E%20(property)%20status_details)\n\n[Link to this property](https://developers.openai.com/api/reference/resources/files/methods/create#(resource)%20files%20%3E%20(model)%20file_object%20%3E%20(schema))\n\n### Upload file\n\nHTTP\n\nHTTP\n\nHTTP\n\nPython\n\nPython\n\nTypeScript\n\nTypeScript\n\nGo\n\nGo\n\nRuby\n\nRuby\n\nJava\n\nJava\n\nCLI Tool\n\nCLI Tool\n\n```\ncurl https://api.openai.com/v1/files \\\n  -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n  -F purpose=\"fine-tune\" \\\n  -F file=\"@mydata.jsonl\"\n  -F expires_after[anchor]=\"created_at\"\n  -F expires_after[seconds]=2592000\n```\n\n```\n{\n  \"id\": \"file-abc123\",\n  \"object\": \"file\",\n  \"bytes\": 120000,\n  \"created_at\": 1677610602,\n  \"expires_at\": 1677614202,\n  \"filename\": \"mydata.jsonl\",\n  \"purpose\": \"fine-tune\",\n}\n```\n\n##### Returns Examples\n\n```\n{\n  \"id\": \"file-abc123\",\n  \"object\": \"file\",\n  \"bytes\": 120000,\n  \"created_at\": 1677610602,\n  \"expires_at\": 1677614202,\n  \"filename\": \"mydata.jsonl\",\n  \"purpose\": \"fine-tune\",\n}\n```"
          }
        },
        {
          "url": "https://help.openai.com/en/articles/8555545-file-uploads-faq",
          "title": "File Uploads FAQ | OpenAI Help Center",
          "description": "File uploads are available on Free and paid ChatGPT plans, subject to plan-specific usage limits and account settings, on the web and in supported mobile apps. File uploads are also available through the API for supported API features, with separate API requirements, supported purposes, and limits.",
          "thumbnail_url": "https://help.openai.com/og-image.png",
          "original_thumbnail_url": "https://help.openai.com/og-image.png",
          "favicon_url": "https://you.com/favicon?domain=help.openai.com&size=128",
          "snippets": [
            "To learn more about how content may be used to improve model performance and the choices you have, see: How your data is used to improve model performance. Please note that we do not use content submitted by customers to our business offerings such as our API and ChatGPT Enterprise to improve model performance.",
            "All text and document files uploaded to a GPT or to a ChatGPT conversation are capped at 2M tokens per file. This limitation does not apply to spreadsheets. For CSV files or spreadsheets, the file size cannot exceed approximately 50MB, depending on the size of each row. For images, there's a limit of 20MB per image.",
            "All common file extensions for text files, spreadsheets, presentations, and documents. Up to 10 files per GPT for the lifetime of that GPT. Keep in mind there are file size restrictions and usage caps per user/org.",
            "Analyze a spreadsheet. Apply a framework or rubric from one document to the contents of another. Transformation: Reshaping information from documents without changing its essence, for example:"
          ],
          "contents": {
            "markdown": "New sign-ups and upgrades to the ChatGPT Pro $200 plan are temporarily paused.\n\nExisting Pro $200 subscriptions will continue to renew as usual. [Learn more](https://help.openai.com/articles/9793128).\n\n[![OpenAI](https://help.openai.com/logo.png)](https://help.openai.com/en)\n\nLanguageEnglish\n\n[Login](https://help.openai.com/auth/login?redirectTo=%2Fauth%2Flogin-success%3FreturnTo%3D%252Fen%252Farticles%252F8555545-file-uploads-faq)\n\n# File Uploads FAQ\n\nFile Uploads FAQ\n\nUpdated: 10 days ago\n\n## About file uploads\n\nChatGPT can work with documents, spreadsheets, presentations, and other supported files you upload in a conversation.\n\n## Availability\n\nFile uploads are available on Free and paid ChatGPT plans, subject to plan-specific usage limits and account settings, on the web and in supported mobile apps. File uploads are also available through the API for supported API features, with separate API requirements, supported purposes, and limits.\n\n## How does the new file uploads capability work?\n\nThe file uploads capability was created to support the following tasks:\n\n**Synthesis:** Combining or analyzing information from files and documents to create something new, for example:\n\n- Upload a spreadsheet, for example a CSV, with a mix of qualitative and quantitative information, and ask ChatGPT to help you understand and visualize the data.\n\n- Compare and contrast two documents.\n\n- Analyze sentiment or tone in a document.\n\n- Analyze a spreadsheet.\n\n- Apply a framework or rubric from one document to the contents of another.\n\n\n**Transformation:** Reshaping information from documents without changing its essence, for example:\n\n- Upload a complicated research paper and ask ChatGPT to provide a simple summary.\n\n- Upload a PowerPoint presentation and ask ChatGPT for feedback on the content.\n\n- Summarize a document in simple terms.\n\n- Rewrite a short document in a particular style.\n\n- Turn a presentation into a document.\n\n\n**Extraction:** Pulling specific information out of a document, for example:\n\n- Upload a PDF and have ChatGPT find any references to a certain topic.\n\n- Pull out relevant quotes from a document.\n\n- Search for any mention of a particular topic from a document or spreadsheet.\n\n- Extract metadata (author, creation date, etc.) from a document.\n\n- Count the number of rows in a spreadsheet that contain a certain attribute.\n\n- Extract specific sections of a document (e.g., all headings or all bullet-point lists).\n\n\n## What types of files are supported?\n\nAll common file extensions for text files, spreadsheets, presentations, and documents.\n\n## How many files can I upload at once per GPT?\n\nUp to **10** files per GPT for the lifetime of that GPT. Keep in mind there are file size restrictions and usage caps per user/org.\n\n## What are the file upload size restrictions?\n\n- All files uploaded to a GPT or a ChatGPT conversation have a hard limit of 512MB per file.\n\n- All text and document files uploaded to a GPT or to a ChatGPT conversation are capped at 2M tokens per file. This limitation does not apply to spreadsheets.\n\n- For CSV files or spreadsheets, the file size cannot exceed approximately 50MB, depending on the size of each row.\n\n- For images, there's a limit of 20MB per image.\n\n- Additionally, there are usage caps:\n\n  - Each end-user is capped at 25GB.\n\n  - Each organization is capped at 100GB.\n\n  - Note: An error will be displayed if a user/org cap has been hit.\n\nUsers can upload up to 80 files every 3 hours. Free users are limited to 3 file uploads per day. Note that we may lower these limits during peak hours.\n\nTroubleshooting \u201cupload limit reached\u201d\n\nIf you see an \u201cupload limit reached\u201d message despite few or no recent uploads, try the steps below:\n\n- Confirm you\u2019re signed into the correct account and subscription plan.\n\n- Remember there are two kinds of limits: a rolling upload rate (e.g., up to 80 files per 3 hours) and shared storage caps (25 GB per user / 100 GB per org) that apply across chats, Projects, and custom GPT knowledge.\n\n- Failed upload attempts can sometimes count toward the upload-rate cap.\n\n- Check status.openai.com for incidents that may affect uploads.\n\n- To escalate, include your account email, a screenshot, the timestamp and timezone, the platform/app/browser you used, and the request ID (if available).\n\n\nCurrently, you can check your Library storage usage in ChatGPT under Settings > Storage. ChatGPT does not currently show how much of your rolling upload-rate quota has been used or how much remains.\n\nAdditionally, to help ensure a smooth experience for all users, we've also updated the file upload limits for _Projects_ based on subscription plan.\n\n- **Free**: Up to 5 files per project\n\n- **Go, Plus**: Up to 25 files per project\n\n- **Edu, Pro, Business, Enterprise**: Up to 40 files per project\n\n\n## How do I delete files I upload?\n\nFiles uploaded to Advanced Data Analysis are deleted within a duration that varies based on your plan. If you are encountering your file usage cap, you can also delete files from recent chats or from any GPTs that you built, as these share caps.\n\n## How are files vs chats retained?\n\nChats\n\n1. Chats are saved in your account until you delete them. To learn more about data controls, see: [Data Controls FAQ](https://help.openai.com/articles/7730893).\n\n2. Once you delete a chat or delete your account, chats are deleted from our systems within 30 days, unless they have previously been de-identified and disassociated from your account, or we have to keep them for security or legal reasons.\n\n\nFiles\n\n1. Files uploaded to ChatGPT are saved in your account up to the retention period of the corresponding chat. Files uploaded as knowledge to a custom GPT are retained until you delete the custom GPT.\n\n2. Once you delete a chat containing a file, your account, or a custom GPT, the associated file is deleted from our systems within 30 days, unless it has previously been de-identified and disassociated from your account, or we have to keep it for security or legal reasons.\n\n3. Files processed via ADA / Document Analysis, and when chatting with a custom GPT (not uploaded as knowledge in GPT config): Retained for a duration that varies based on your plan.\n\n\nFor more information about file and chat retention, see: [Chat and File Retention Policies in ChatGPT](https://help.openai.com/articles/8983778).\n\n## Are you able to handle images embedded in docs/presentations/PDF?\n\nThe answer depends on your plan and the file type you're working with.\n\nChatGPT Enterprise supports Visual Retrieval for PDF files. To learn more about PDF visual retrieval, see: [Visual Retrieval with PDFs FAQ](https://help.openai.com/articles/10416312).\n\nAll other plans and document files only support text-based retrieval. This means that ChatGPT will extract digital text from the file and discard any images.\n\n## Will OpenAI use files uploaded to train its models?\n\nThe answer depends on the service you are using. For more information about data usage for consumer services, see: [Data Usage for Consumer Services FAQ](https://help.openai.com/articles/7039943). Content may include files that are uploaded. To learn more about how content may be used to improve model performance and the choices you have, see: [How your data is used to improve model performance](https://help.openai.com/articles/5722486).\n\nPlease note that we do not use content submitted by customers to our business offerings such as our API and ChatGPT Enterprise to improve model performance.\n\nPlease see our [Enterprise Privacy page](https://openai.com/enterprise-privacy) for information on how we use business data.\n\n## Need more help? Contact us for product questions, account support and general troubleshooting.\n\nAI Chat\n\nChat now\n\nAI Phone Call\n\n[1-888-GPT-0090](tel:+18884780090)\n\nCalls may be recorded to improve OpenAI services. If you wish to report content, please use the in-app reporting or the [Report Content Form](https://openai.com/form/report-content/). [Learn more.](https://help.openai.com/articles/11391933-1-888-gpt-0090-openai-help-over-phone)\n\n## Related articles\n\n- [How does the new file uploads capability work?\\\\\n\\\\\nHow does file uploading help? What can I do with it?](https://help.openai.com/en/articles/8982896-how-does-the-new-file-uploads-capability-work)\n- [ChatGPT Capabilities Overview\\\\\n\\\\\nLearn about ChatGPT's capabilities and features](https://help.openai.com/en/articles/9260256-chatgpt-capabilities-overview)\n- [Using Codex with your ChatGPT plan\\\\\n\\\\\nLearn how to access and get started with Codex.](https://help.openai.com/en/articles/11369540-using-codex-with-your-chatgpt-plan)\n\n## Was this article helpful?\n\nSubmit"
          }
        },
        {
          "url": "https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472",
          "title": "Questions about File Upload Limits with the OpenAI File API - API ...",
          "description": "Hi, I have a question regarding OpenAI file uploads. According to the File uploads FAQ, it seems that the number of files you can upload depends on your ChatGPT plan. However, when I use the OpenAI File API, I don\u2019t seem to run into this limitation. For example, I uploaded around 100 files ...",
          "thumbnail_url": "https://us1.discourse-cdn.com/openai1/original/4X/0/4/c/04c8546833f0824a49d21f50e2b08dd44bfd3d05.png",
          "original_thumbnail_url": "https://us1.discourse-cdn.com/openai1/original/4X/0/4/c/04c8546833f0824a49d21f50e2b08dd44bfd3d05.png",
          "page_age": "2025-09-16T23:24:30",
          "favicon_url": "https://you.com/favicon?domain=community.openai.com&size=128",
          "snippets": [
            "Hi, I have a question regarding OpenAI file uploads. According to the File uploads FAQ, it seems that the number of files you can upload depends on your ChatGPT plan. However, when I use the OpenAI File API, I don\u2019t seem to run into this limitation. For example, I uploaded around 100 files through the API and connected them to a Vector Store without hitting any restrictions.",
            "Hi, I have a question regarding OpenAI file uploads. According to the File uploads FAQ, it seems that the number of files you can upload depends on your ChatGPT plan. However, when I use the OpenAI File API, I don\u2019t se\u2026"
          ],
          "contents": {
            "markdown": "[Skip to last reply](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472/4) [Skip to top](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472/1)\n\n[Skip to main content](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472#main-container)\n\n# [Questions about File Upload Limits with the OpenAI File API](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472)\n\n[API](https://community.openai.com/c/api/7)\n\n- [file-uploads](https://community.openai.com/tag/file-uploads/395),\n- [vector-store](https://community.openai.com/tag/vector-store/654),\n- [file-search](https://community.openai.com/tag/file-search/707)\n\nYou have selected **0** posts.\n\n[select all](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472)\n\n[cancel selecting](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472)\n\n1.5k\nviews\n2\nlinks\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/aprendendo.next/48/721758_2.png)](https://community.openai.com/u/aprendendo.next \"aprendendo.next\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/brother0326/48/667697_2.png)](https://community.openai.com/u/brother0326 \"brother0326\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/wendyjiao/48/511350_2.png)](https://community.openai.com/u/wendyjiao \"wendyjiao\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/48/719663_2.png)](https://community.openai.com/u/_j \"_j\")\n\n[Sep 2025](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472/1 \"Jump to the first post\")\n\n1 / 4\n\n\nSep 2025\n\n\n[Sep 2025](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472/4)\n\n## post by brother0326 on Sep 16, 2025\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/brother0326/48/667697_2.png)](https://community.openai.com/u/brother0326)\n\n[brother0326](https://community.openai.com/u/brother0326)\n\n[Sep 2025](https://community.openai.com/t/questions-about-file-upload-limits-with-the-openai-file-api/1358472 \"Post date\")\n\nHi, I have a question regarding OpenAI file uploads.\n\nAccording to the [File uploads FAQ](https://help.openai.com/en/articles/8555545-file-uploads-faq), it seems that the number of files you can upload depends on your ChatGPT plan.\n\nHowever, when I use the **OpenAI File API**, I don\u2019t seem to run into this limitation.\n\n- For example, I uploaded around 100 files through the API and connected them to a Vector Store without hitting any restrictions.\n\nFrom what I understand, the only clear limits are:\n\n- Maximum file size per upload: **512MB**\n\n- Maximum total storage per organization: **100GB**\n\n\nSo my questions are:\n\n1. Is there **no specific limit on the number of files** that can be uploaded via the File API?\n\n2. Is there a defined limit on the **number of files that can be attached to a single Vector Store**?\n\n\nIf anyone has official guidance or experience on these constraints, I\u2019d really appreciate your input.\n\nMe too\n\n1.5k\nviews\n2\nlinks\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/aprendendo.next/48/721758_2.png)](https://community.openai.com/u/aprendendo.next \"aprendendo.next\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/brother0326/48/667697_2.png)](https://community.openai.com/u/brother0326 \"brother0326\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/wendyjiao/48/511350_2.png)](https://community.openai.com/u/wendyjiao \"wendyjiao\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/48/719663_2.png)](https://community.openai.com/u/_j \"_j\")\n\n## post by \\_j on Sep 16, 2025\n\n## post by aprendendo.next on Sep 16, 2025\n\n## post by wendyjiao on Sep 22, 2025\n\nReply\n\n### Related topics\n\n| Topic | Replies | Views | Activity |\n| --- | --- | --- | --- |\n| [Open AI API file upload limitations on Chat Completions APi](https://community.openai.com/t/open-ai-api-file-upload-limitations-on-chat-completions-api/1372667)<br>[API](https://community.openai.com/c/api/7) | [8](https://community.openai.com/t/open-ai-api-file-upload-limitations-on-chat-completions-api/1372667/1) | 992 | [Jan 28](https://community.openai.com/t/open-ai-api-file-upload-limitations-on-chat-completions-api/1372667/10) |\n| [Confused about file upload limits](https://community.openai.com/t/confused-about-file-upload-limits/1236701)<br>[ChatGPT](https://community.openai.com/c/chatgpt/19) <br>- [file-uploads](https://community.openai.com/tag/file-uploads/395) | [0](https://community.openai.com/t/confused-about-file-upload-limits/1236701/1) | 6.5k | [Apr 2025](https://community.openai.com/t/confused-about-file-upload-limits/1236701/1) |\n| [What are the default rate limits for the File API](https://community.openai.com/t/what-are-the-default-rate-limits-for-the-file-api/978364)<br>[API](https://community.openai.com/c/api/7) <br>- [rate-limit](https://community.openai.com/tag/rate-limit/129) | [3](https://community.openai.com/t/what-are-the-default-rate-limits-for-the-file-api/978364/1) | 631 | [Oct 2024](https://community.openai.com/t/what-are-the-default-rate-limits-for-the-file-api/978364/4) |\n| [Is it indeed correct you can upload more than 20 files in a thread? My testing shows you can](https://community.openai.com/t/is-it-indeed-correct-you-can-upload-more-than-20-files-in-a-thread-my-testing-shows-you-can/670013)<br>[API](https://community.openai.com/c/api/7) | [3](https://community.openai.com/t/is-it-indeed-correct-you-can-upload-more-than-20-files-in-a-thread-my-testing-shows-you-can/670013/1) | 1.7k | [Jun 2024](https://community.openai.com/t/is-it-indeed-correct-you-can-upload-more-than-20-files-in-a-thread-my-testing-shows-you-can/670013/4) |\n| [Max 100 files in vector store](https://community.openai.com/t/max-100-files-in-vector-store/729876)<br>[API](https://community.openai.com/c/api/7) <br>- [assistants](https://community.openai.com/tag/assistants/345) | [9](https://community.openai.com/t/max-100-files-in-vector-store/729876/1) | 5.7k | [May 2024](https://community.openai.com/t/max-100-files-in-vector-store/729876/10) |\n\nTopic list, column headers with buttons are sortable.\n\nDeveloper Community\n\n\nConnect with other developers building with the OpenAI Platform.\n\n\nHelp\n\n\n- [Support](https://help.openai.com/en/articles/6614161-how-can-i-contact-support)\n\nDeveloper Resources\n\n\n- [API Documentation](https://platform.openai.com/overview)\n- [Service status](https://status.openai.com/)\n- [Cookbook](https://github.com/openai/openai-cookbook)\n\n[Terms & policies](https://openai.com/policies) [Privacy policy](https://openai.com/policies/privacy-policy)"
          }
        },
        {
          "url": "https://www.reddit.com/r/OpenAI/comments/1lhvkum/open_ai_10_gb_file_limit/",
          "title": "r/OpenAI on Reddit: Open AI 10 GB file limit",
          "description": "Open AI says here a user can only upload 10GB of data: https://help.openai.com/en/articles/8983719-what-are-the-file-upload-size-restrictions But\u2026",
          "thumbnail_url": "https://share.redd.it/preview/post/1lhvkum",
          "original_thumbnail_url": "https://share.redd.it/preview/post/1lhvkum",
          "page_age": "2025-06-22T18:55:43",
          "favicon_url": "https://you.com/favicon?domain=www.reddit.com&size=128",
          "snippets": [
            "Everything going on with what's retained because of the NYT lawsuit is separately stored and inaccessible to everyone not directly involved in the lawsuit (and currently only on the OpenAI side, unless I've missed a ruling in the last few days). It doesn't impact regular operations. ... Just referencing the general upload size for any file given any conversation thread given any model, and yes it's a relatively generic statement as per usual coming from OpenAI.",
            "An objective method to determine precisely how large of a file can be uploaded and entirely analyzed in any given session would be to explicitly request for the current GPT instance being interfaced with to open the code interpreter/python tool (although these days they're technically slightly different) and request model check specifically the largest file size that can be handled and interpreted.",
            "Another note is that the file upload size doesn't necessarily matter as much as it does the ephemeral nature of every session's cwd, as the mnt/ directory only lasts for 60 seconds unless a specific \"mode\" has been enabled (DM for info I guess...), So you might notice it doesn't matter what file you might upload in any given session.",
            "I do have a deep understanding of the architectural aspects of the models and the backend functionality and the end-user frontend, So rather than expounding on this until some end, just DM me if you have any questions specifically because I'm not sure what this initial OG post is about other than file size upload limit, lol."
          ],
          "contents": {
            "markdown": "[Skip to main content](#main-content)\n\n\n\n\n\n[Go to OpenAI](https://www.reddit.com/r/OpenAI/)\n\n[r/OpenAI](https://www.reddit.com/r/OpenAI/)\n\n\u20221y ago\n\n[xodac](https://www.reddit.com/user/xodac/)\n\n\n# Open AI 10 GB file limit\n\n[Question](/r/OpenAI/?f=flair_name%3A%22Question%22)\n\nOpen AI says here a user can only upload 10GB of data: <https://help.openai.com/en/articles/8983719-what-are-the-file-upload-size-restrictions>\n\nBut they don't specify a timeframe. Is there per day/week/month/year? Or permanent? If permanent, is it possible to go back and delete any files I uploaded previously\n\nShare\n\n\n# People also ask about section\n\nPeople also ask about\n\n[Open AI file upload size restrictions](https://www.reddit.com/answers/db3c2f44-7fa2-413a-a356-60303fef6d9f/?q=Open+AI+file+upload+size+restrictions&source=PDP&ep=pdp_unit&relatedPostId=t3_1lhvkum)\n\n[File uploads FAQ for ChatGPT](https://www.reddit.com/answers/cdb227a4-d344-4ba7-bb70-e0504586a479/?q=File+uploads+FAQ+for+ChatGPT&source=PDP&ep=pdp_unit&relatedPostId=t3_1lhvkum)\n\n[ChatGPT file upload limits](https://www.reddit.com/answers/043ce53f-c240-4b06-afce-465f0fa8463f/?q=ChatGPT+file+upload+limits&source=PDP&ep=pdp_unit&relatedPostId=t3_1lhvkum)\n\n[Failed to delete files in ChatGPT](https://www.reddit.com/answers/ed7168ce-7e1d-42a2-a432-7b7ac78b86b9/?q=Failed+to+delete+files+in+ChatGPT&source=PDP&ep=pdp_unit&relatedPostId=t3_1lhvkum)\n\n[Impact of AI on job markets](https://www.reddit.com/answers/364ae522-f544-47a5-a408-cae0bdffdb73/?q=Impact+of+AI+on+job+markets&source=PDP&ep=pdp_unit&relatedPostId=t3_1lhvkum)\n\n\n[https://www.openai.com/](https://openai.com/) - [https://help.openai.com/](https://help.openai.com/en)\n\nPublic\n\n\n\nAnyone can view, post, and comment to this community\n\n00\n\n## Top Posts\n\n* [Reddit reReddit: Top posts of June 22, 2025 ---](https://www.reddit.com/posts/2025/june-22-1/global/)\n* [Reddit reReddit: Top posts of June 2025 ---](https://www.reddit.com/posts/2025/june/global/)\n* [Reddit reReddit: Top posts of 2025 ---](https://www.reddit.com/posts/2025/global/)\n\n* [Home](/?feed=home)\n* [Popular](/r/popular/)\n* [News](/news/)\n* [Explore](/explore/)\n* [Best of Reddit](https://www.reddit.com/posts/2026/global/)\n* [Best of Reddit in Portuguese](https://www.reddit.com/posts/2026/tl-pt-BR/)\n* [Best of Reddit in German](https://www.reddit.com/posts/2026/tl-de/)\n* [Reddit Rules](https://www.redditinc.com/policies/content-policy)\n* [Privacy Policy](https://www.reddit.com/policies/privacy-policy)\n* [User Agreement](https://www.redditinc.com/policies/user-agreement)\n* [Your Privacy Choices](https://support.reddithelp.com/hc/articles/43980704794004)\n* [Accessibility](https://support.reddithelp.com/hc/sections/38303584022676-Accessibility)\n* [Reddit, Inc. \u00a9 2026. All rights reserved.](https://redditinc.com)\n\nJoin the most real place on the internet\n\n\n\nContinue with Phone Number\n\n\n\nContinue with Email\n\nBy continuing, you agree to our [User Agreement](https://www.redditinc.com/policies/user-agreement) and acknowledge that you understand the [Privacy Policy](https://www.redditinc.com/policies/privacy-policy).\n\n\n\n  \n"
          }
        },
        {
          "url": "https://community.openai.com/t/assistant-v2-files-size-limit/724950",
          "title": "Assistant V2 files. Size limit - API - OpenAI Developer Community",
          "description": "I see from here ( dated a while ago) In Assistants, Is there a limit to File size and number of files? - #5 by tyagi.shubham177 \u201cYou can attach a maximum of 20 files per Assistant, and they can be at most 512 MB each.\u201d I have tried to upload to the vector store some PDF\u2019s of which 2 are ...",
          "thumbnail_url": "https://us1.discourse-cdn.com/openai1/original/4X/0/4/c/04c8546833f0824a49d21f50e2b08dd44bfd3d05.png",
          "original_thumbnail_url": "https://us1.discourse-cdn.com/openai1/original/4X/0/4/c/04c8546833f0824a49d21f50e2b08dd44bfd3d05.png",
          "page_age": "2024-04-22T18:52:19",
          "favicon_url": "https://you.com/favicon?domain=community.openai.com&size=128",
          "snippets": [
            "I see from here ( dated a while ago) In Assistants, Is there a limit to File size and number of files? - #5 by tyagi.shubham177 \u201cYou can attach a maximum of 20 files per Assistant, and they can be at most 512 MB each.\u201d I have tried to upload to the vector store some PDF\u2019s of which 2 are 450 meg & 350 meg.",
            "I see from here ( dated a while ago) In Assistants, Is there a limit to File size and number of files? - #5 by tyagi.shubham177 \u201cYou can attach a maximum of 20 files per Assistant, and they can be at most 512 MB each.\u201d \u2026"
          ],
          "contents": {
            "markdown": "[Skip to last reply](https://community.openai.com/t/assistant-v2-files-size-limit/724950/5) [Skip to top](https://community.openai.com/t/assistant-v2-files-size-limit/724950/1)\n\n[Skip to main content](https://community.openai.com/t/assistant-v2-files-size-limit/724950#main-container)\n\n# [Assistant V2 files. Size limit](https://community.openai.com/t/assistant-v2-files-size-limit/724950)\n\n[API](https://community.openai.com/c/api/7)\n\nYou have selected **0** posts.\n\n[select all](https://community.openai.com/t/assistant-v2-files-size-limit/724950)\n\n[cancel selecting](https://community.openai.com/t/assistant-v2-files-size-limit/724950)\n\n6.2k\nviews\n5\nlinks\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/parkforce/48/237870_2.png)2](https://community.openai.com/u/parkforce \"parkforce\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ahmedr_s/48/422102_2.png)](https://community.openai.com/u/ahmedr_s \"ahmedr_s\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/veitb/48/712987_2.png)](https://community.openai.com/u/VeitB \"VeitB\")\n\n[![](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/48.png)](https://community.openai.com/u/anon22939549 \"anon22939549\")\n\nSummarize\n\n[Apr 2024](https://community.openai.com/t/assistant-v2-files-size-limit/724950/1 \"Jump to the first post\")\n\n1 / 5\n\n\nApr 2024\n\n\n[Jul 2024](https://community.openai.com/t/assistant-v2-files-size-limit/724950/5)\n\n## post by parkforce on Apr 22, 2024\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/parkforce/48/237870_2.png)](https://community.openai.com/u/parkforce)\n\n[parkforce](https://community.openai.com/u/parkforce)\n\n[Apr 2024](https://community.openai.com/t/assistant-v2-files-size-limit/724950 \"Post date\")\n\nI see from here ( dated a while ago) [In Assistants, Is there a limit to File size and number of files? - #5 by tyagi.shubham177](https://community.openai.com/t/in-assistants-is-there-a-limit-to-file-size-and-number-of-files/477422/5)\n\n\u201cYou can attach a maximum of 20 files per Assistant, and they can be at most 512 MB each.\u201d\n\nI have tried to upload to the vector store some PDF\u2019s of which 2 are 450 meg & 350 meg.\n\nThe 2 larger files show in the vector store but marked \u2018Failed\u2019\n\nWhere can I find documentation on file limits ?\n\nAny help appreciated.\n\nMe too\n\n6.2k\nviews\n5\nlinks\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/parkforce/48/237870_2.png)2](https://community.openai.com/u/parkforce \"parkforce\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ahmedr_s/48/422102_2.png)](https://community.openai.com/u/ahmedr_s \"ahmedr_s\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/veitb/48/712987_2.png)](https://community.openai.com/u/VeitB \"VeitB\")\n\n[![](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/48.png)](https://community.openai.com/u/anon22939549 \"anon22939549\")\n\nSummarize\n\n## post by anon22939549 on Apr 23, 2024\n\n## post by VeitB on Apr 23, 2024\n\n## post by parkforce on Apr 23, 2024\n\n3 months later\n\n\n## post by ahmedr\\_s on Jul 13, 2024\n\nReply\n\n### Related topics\n\n| Topic | Replies | Views | Activity |\n| --- | --- | --- | --- |\n| [Maximum Files per Assistant (20) to low](https://community.openai.com/t/maximum-files-per-assistant-20-to-low/1114704)<br>[API](https://community.openai.com/c/api/7) | [5](https://community.openai.com/t/maximum-files-per-assistant-20-to-low/1114704/1) | 639 | [Feb 2025](https://community.openai.com/t/maximum-files-per-assistant-20-to-low/1114704/6) |\n| [AI assistants file limits](https://community.openai.com/t/ai-assistants-file-limits/566434)<br>[API](https://community.openai.com/c/api/7) <br>- [assistants-api](https://community.openai.com/tag/assistants-api/355) | [10](https://community.openai.com/t/ai-assistants-file-limits/566434/1) | 13.9k | [Oct 2024](https://community.openai.com/t/ai-assistants-file-limits/566434/11) |\n| [In Assistants, Is there a limit to File size and number of files?](https://community.openai.com/t/in-assistants-is-there-a-limit-to-file-size-and-number-of-files/477422)<br>[API](https://community.openai.com/c/api/7) | [6](https://community.openai.com/t/in-assistants-is-there-a-limit-to-file-size-and-number-of-files/477422/1) | 9.3k | [Nov 2023](https://community.openai.com/t/in-assistants-is-there-a-limit-to-file-size-and-number-of-files/477422/7) |\n| [400GB to Vector Store(s) + Assistant](https://community.openai.com/t/400gb-to-vector-store-s-assistant/1363219)<br>[API](https://community.openai.com/c/api/7) <br>- [vector-store](https://community.openai.com/tag/vector-store/654) | [12](https://community.openai.com/t/400gb-to-vector-store-s-assistant/1363219/1) | 602 | [Oct 2025](https://community.openai.com/t/400gb-to-vector-store-s-assistant/1363219/13) |\n| [Failed to index file File contains too may tokens. Max allowed tokens per file is 2000000](https://community.openai.com/t/failed-to-index-file-file-contains-too-may-tokens-max-allowed-tokens-per-file-is-2000000/512298)<br>[API](https://community.openai.com/c/api/7) <br>- [api](https://community.openai.com/tag/api/33),<br>- [assistants](https://community.openai.com/tag/assistants/345) | [22](https://community.openai.com/t/failed-to-index-file-file-contains-too-may-tokens-max-allowed-tokens-per-file-is-2000000/512298/1) | 5.0k | [Mar 2024](https://community.openai.com/t/failed-to-index-file-file-contains-too-may-tokens-max-allowed-tokens-per-file-is-2000000/512298/23) |\n\nTopic list, column headers with buttons are sortable.\n\nDeveloper Community\n\n\nConnect with other developers building with the OpenAI Platform.\n\n\nHelp\n\n\n- [Support](https://help.openai.com/en/articles/6614161-how-can-i-contact-support)\n\nDeveloper Resources\n\n\n- [API Documentation](https://platform.openai.com/overview)\n- [Service status](https://status.openai.com/)\n- [Cookbook](https://github.com/openai/openai-cookbook)\n\n[Terms & policies](https://openai.com/policies) [Privacy policy](https://openai.com/policies/privacy-policy)"
          }
        },
        {
          "url": "https://community.openai.com/t/ai-assistants-file-limits/566434",
          "title": "AI assistants file limits - API - OpenAI Developer Community",
          "description": "I\u2019m working on setting up a super flexible AI buddy that can tweak its hosted files on the fly. The idea is to make a smart system that keeps getting better based on how it performs and what my company needs. When I see that my AI sidekick needs more training, I\u2019m planning to smoothly add ...",
          "thumbnail_url": "https://us1.discourse-cdn.com/openai1/original/4X/0/4/c/04c8546833f0824a49d21f50e2b08dd44bfd3d05.png",
          "original_thumbnail_url": "https://us1.discourse-cdn.com/openai1/original/4X/0/4/c/04c8546833f0824a49d21f50e2b08dd44bfd3d05.png",
          "page_age": "2023-12-20T14:24:09",
          "favicon_url": "https://you.com/favicon?domain=community.openai.com&size=128",
          "snippets": [
            "I\u2019m working on setting up a super flexible AI buddy that can tweak its hosted files on the fly. The idea is to make a smart system that keeps getting better based on how it performs and what my company needs. When I see that my AI sidekick needs more training, I\u2019m planning to smoothly add more info to make it even better.",
            "I\u2019m working on setting up a super flexible AI buddy that can tweak its hosted files on the fly. The idea is to make a smart system that keeps getting better based on how it performs and what my company needs. When I see \u2026"
          ],
          "contents": {
            "markdown": "[Skip to last reply](https://community.openai.com/t/ai-assistants-file-limits/566434/12) [Skip to top](https://community.openai.com/t/ai-assistants-file-limits/566434/1)\n\n[Skip to main content](https://community.openai.com/t/ai-assistants-file-limits/566434#main-container)\n\n# [AI assistants file limits](https://community.openai.com/t/ai-assistants-file-limits/566434)\n\n[API](https://community.openai.com/c/api/7)\n\n- [assistants-api](https://community.openai.com/tag/assistants-api/355)\n\nYou have selected **0** posts.\n\n[select all](https://community.openai.com/t/ai-assistants-file-limits/566434)\n\n[cancel selecting](https://community.openai.com/t/ai-assistants-file-limits/566434)\n\n13.9k\nviews\n8\nlikes\n6\nlinks\n6\nusers\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/jlvanhulst/48/195305_2.png)5](https://community.openai.com/u/jlvanhulst \"jlvanhulst\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/aviplo/48/276278_2.png)2](https://community.openai.com/u/aviplo \"aviplo\")\n\n[![](https://avatars.discourse-cdn.com/v4/letter/r/da6949/48.png)](https://community.openai.com/u/rn1 \"rn1\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/bill-ai/48/448778_2.png)](https://community.openai.com/u/Bill-AI \"Bill-AI\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/rizwan.ahmed/48/448466_2.png)](https://community.openai.com/u/rizwan.ahmed \"rizwan.ahmed\")\n\nSummarize\n\n[Dec 2023](https://community.openai.com/t/ai-assistants-file-limits/566434/1 \"Jump to the first post\")\n\n1 / 12\n\n\nDec 2023\n\n\n[Oct 2024](https://community.openai.com/t/ai-assistants-file-limits/566434/12)\n\n## post by aviplo on Dec 20, 2023\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/aviplo/48/276278_2.png)](https://community.openai.com/u/aviplo)\n\n[aviplo](https://community.openai.com/u/aviplo)\n\n[Dec 2023](https://community.openai.com/t/ai-assistants-file-limits/566434 \"Post date\")\n\nI\u2019m working on setting up a super flexible AI buddy that can tweak its hosted files on the fly. The idea is to make a smart system that keeps getting better based on how it performs and what my company needs. When I see that my AI sidekick needs more training, I\u2019m planning to smoothly add more info to make it even better.\n\nRight now, openai has a rule that says we can only have up to 20 files. This rule is a bit of a headache, especially since I\u2019m planning to fine-tune the AI\u2019s performance regularly. Because this project is always changing and needs constant upgrades, it\u2019s important to figure out how to handle this file limit. Finding the right balance between making the AI awesome and dealing with the 20-file cap takes some careful thinking and considering different options to make sure this whole thing is a success.\n\nMe too\n\n13.9k\nviews\n8\nlikes\n6\nlinks\n6\nusers\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/jlvanhulst/48/195305_2.png)5](https://community.openai.com/u/jlvanhulst \"jlvanhulst\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/aviplo/48/276278_2.png)2](https://community.openai.com/u/aviplo \"aviplo\")\n\n[![](https://avatars.discourse-cdn.com/v4/letter/r/da6949/48.png)](https://community.openai.com/u/rn1 \"rn1\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/bill-ai/48/448778_2.png)](https://community.openai.com/u/Bill-AI \"Bill-AI\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/rizwan.ahmed/48/448466_2.png)](https://community.openai.com/u/rizwan.ahmed \"rizwan.ahmed\")\n\nSummarize\n\n## post by jlvanhulst on Dec 20, 2023\n\n## post by Foxalabs on Dec 20, 2023\n\n## post by jlvanhulst on Dec 20, 2023\n\n## post by aviplo on Dec 20, 2023\n\n## post by jlvanhulst on Dec 20, 2023\n\n1 month later\n\n\n## post by rn1 on Jan 23, 2024\n\n## post by jlvanhulst on Jan 23, 2024\n\n2 months later\n\n\n## post by Bill-AI on Mar 15, 2024\n\n## post by jlvanhulst on Mar 16, 2024\n\n7 months later\n\n\n## post by rizwan.ahmed on Oct 3, 2024\n\n## Closed on Oct 3, 2024\n\nReply\n\n### Related topics\n\n| Topic | Replies | Views | Activity |\n| --- | --- | --- | --- |\n| [The 20 File Limit on assistants is not useful for large Retrieval-Augmented Generation](https://community.openai.com/t/the-20-file-limit-on-assistants-is-not-useful-for-large-retrieval-augmented-generation/492800)<br>[API](https://community.openai.com/c/api/7) <br>- [assistants](https://community.openai.com/tag/assistants/345) | [5](https://community.openai.com/t/the-20-file-limit-on-assistants-is-not-useful-for-large-retrieval-augmented-generation/492800/1) | 3.9k | [Nov 2023](https://community.openai.com/t/the-20-file-limit-on-assistants-is-not-useful-for-large-retrieval-augmented-generation/492800/6) |\n| [Maximum Files per Assistant (20) to low](https://community.openai.com/t/maximum-files-per-assistant-20-to-low/1114704)<br>[API](https://community.openai.com/c/api/7) | [5](https://community.openai.com/t/maximum-files-per-assistant-20-to-low/1114704/1) | 638 | [Feb 2025](https://community.openai.com/t/maximum-files-per-assistant-20-to-low/1114704/6) |\n| [Only 20 files per Assistant?](https://community.openai.com/t/only-20-files-per-assistant/520976)<br>[Feedback](https://community.openai.com/c/api/feedback/31) | [4](https://community.openai.com/t/only-20-files-per-assistant/520976/1) | 1.8k | [Nov 2023](https://community.openai.com/t/only-20-files-per-assistant/520976/6) |\n| [Assistant V2 files. Size limit](https://community.openai.com/t/assistant-v2-files-size-limit/724950)<br>[API](https://community.openai.com/c/api/7) | [4](https://community.openai.com/t/assistant-v2-files-size-limit/724950/1) | 6.2k | [Jul 2024](https://community.openai.com/t/assistant-v2-files-size-limit/724950/5) |\n| [Increasing the maximum number of files that can be attached to an assistant](https://community.openai.com/t/increasing-the-maximum-number-of-files-that-can-be-attached-to-an-assistant/538331)<br>[Feedback](https://community.openai.com/c/api/feedback/31) <br>- [assistants-api](https://community.openai.com/tag/assistants-api/355),<br>- [assistants](https://community.openai.com/tag/assistants/345) | [12](https://community.openai.com/t/increasing-the-maximum-number-of-files-that-can-be-attached-to-an-assistant/538331/1) | 2.5k | [Dec 2024](https://community.openai.com/t/increasing-the-maximum-number-of-files-that-can-be-attached-to-an-assistant/538331/16) |\n\nTopic list, column headers with buttons are sortable.\n\nDeveloper Community\n\n\nConnect with other developers building with the OpenAI Platform.\n\n\nHelp\n\n\n- [Support](https://help.openai.com/en/articles/6614161-how-can-i-contact-support)\n\nDeveloper Resources\n\n\n- [API Documentation](https://platform.openai.com/overview)\n- [Service status](https://status.openai.com/)\n- [Cookbook](https://github.com/openai/openai-cookbook)\n\n[Terms & policies](https://openai.com/policies) [Privacy policy](https://openai.com/policies/privacy-policy)"
          }
        },
        {
          "url": "https://learn.microsoft.com/en-us/answers/questions/1499220/maximum-file-size-for-openai-service",
          "title": "Maximum file size for OpenAI service - Microsoft Q&A",
          "description": "Hello. I'm working on with Azure AI Studio, and I'm gathering information about the file size limitations. This document \"Quotas limits: max size of all files per upload\" says, \"Max size of all files per upload\" is limited to 16MB.\u2026",
          "thumbnail_url": "https://learn.microsoft.com/en-us/media/open-graph-image.png",
          "original_thumbnail_url": "https://learn.microsoft.com/en-us/media/open-graph-image.png",
          "page_age": "2024-01-17T00:00:00",
          "favicon_url": "https://you.com/favicon?domain=learn.microsoft.com&size=128",
          "snippets": [
            "I can't understand why is this limitation so low when in the \"Project limits\" document it says we can use Azure Blob Storage to upload .pdf files of 25MB for Azure AI Search ... An Azure service that provides access to OpenAI\u2019s GPT-3 models with enterprise capabilities.",
            "Thanks for the question, If you want to use OpenAI models to do question answering\\completions on your custom data text files, this limit applies to how many data files you can upload and the total size of the files. There is an upload limit, and there are some caveats about document structure and how it might affect the quality of responses from the model.",
            "The 16MB file size limit you mentioned refers to the maximum size of files that can be uploaded directly to Azure AI Studio. This limit is in place to ensure efficient processing and to optimize the user experience. On the other hand, Azure AI Search allows you to index data from various sources, including Azure Blob Storage. When using Azure Blob Storage as a data source, the file size limit for individual PDF files is 25MB."
          ],
          "contents": {
            "markdown": "An Azure service that provides access to OpenAI\u2019s GPT-3 models with enterprise capabilities.\n\nThanks for the question, If you want to use OpenAI models to do question answering\\completions on your custom data text files, this limit applies to how many data files you can upload and the total size of the files. There is an upload limit, and there are some caveats about document structure and how it might affect the quality of responses from the model. Azure AI Studio and Azure AI Search are two separate services with different capabilities and limitations. The 16MB file size limit you mentioned refers to the maximum size of files that can be uploaded directly to Azure AI Studio. This limit is in place to ensure efficient processing and to optimize the user experience.\n\nOn the other hand, Azure AI Search allows you to index data from various sources, including Azure Blob Storage. When using Azure Blob Storage as a data source, the file size limit for individual PDF files is 25MB. This limit is specific to Azure AI Search and is separate from the file size limit for uploads in Azure AI Studio.\n\nIn summary, the file size limits for Azure AI Studio and Azure AI Search are different because they are separate services with different capabilities and limitations."
          }
        },
        {
          "url": "https://community.openai.com/t/openai-file-size-limit-and-batch-api-result-files/897738",
          "title": "OpenAI File Size Limit and Batch API result files - API - OpenAI ...",
          "description": "I am using Batch API to embed large amount of documents. OpenAI has a total file size limit per organization of 100 GB, which affects the amount of data I can upload at any time for processing them. How about the result files? Do their size count towards this limit?",
          "thumbnail_url": "https://us1.discourse-cdn.com/openai1/original/4X/0/4/c/04c8546833f0824a49d21f50e2b08dd44bfd3d05.png",
          "original_thumbnail_url": "https://us1.discourse-cdn.com/openai1/original/4X/0/4/c/04c8546833f0824a49d21f50e2b08dd44bfd3d05.png",
          "page_age": "2024-08-07T15:54:49",
          "favicon_url": "https://you.com/favicon?domain=community.openai.com&size=128",
          "snippets": [
            "I am using Batch API to embed large amount of documents. OpenAI has a total file size limit per organization of 100 GB, which affects the amount of data I can upload at any time for processing them. How about the result\u2026"
          ]
        },
        {
          "url": "https://developers.openai.com/api/docs/guides/file-inputs",
          "title": "File inputs | OpenAI API",
          "description": "Learn how to use files as file inputs in the OpenAI API.",
          "thumbnail_url": "https://developers.openai.com/og/api/docs/guides/file-inputs.png",
          "original_thumbnail_url": "https://developers.openai.com/og/api/docs/guides/file-inputs.png",
          "favicon_url": "https://you.com/favicon?domain=developers.openai.com&size=128",
          "snippets": [
            "File size limits: A single request can include more than one file, but each file must be under 50 MB. The combined limit across all files in the request is 50 MB. Supported models: PDF parsing that includes text and page images requires models with vision capabilities, such as gpt-4o and later models. File upload purpose: You can upload files with any supported purpose, but use user_data for files you plan to pass as model inputs.",
            "File input support depends on the API endpoint. The Responses API accepts the file types listed below as input_file items. Chat Completions accepts only PDF files as file content parts. Use the Responses API for non-PDF file inputs. To use text from a file in Chat Completions, read the file in your application and send its contents as a text content part.",
            "Use Hosted Shell for spreadsheet-heavy tasks that need detailed analysis, such as aggregations, joins, charting, or custom calculations. For non-PDF files, the Responses API doesn\u2019t extract embedded images or charts into the model context.",
            "For PDF inputs in the Responses API, set the optional detail field on an input_file item to auto, low, or high to control how the API processes page images. If omitted, detail defaults to auto. For GPT-5.6 and later models, auto uses high; for earlier models, it uses low."
          ],
          "contents": {
            "markdown": "For the complete documentation index, see [llms.txt](https://developers.openai.com/llms.txt). Markdown versions of documentation pages are available by appending\n`.md` to the page URL.\n\n## Search the API docs\n\nSearch docs\n\n### Suggested\n\nresponse\\_formatreasoning\\_effortstreamingtools\n\nPrimary navigation\n\nSearch docs\n\n### Suggested\n\nresponse\\_formatreasoning\\_effortstreamingtools\n\nOverview  Models  Agents  Tools  Audio & voice  Production  API reference\n\nOverviewModelsAgentsToolsAudio & voiceProductionAPI referenceDocsOverview\n\n- [Home](https://developers.openai.com/api/docs)\n\n### Get started\n\n- [Quickstart](https://developers.openai.com/api/docs/quickstart)\n- [Using GPT-6 Astra](https://developers.openai.com/api/docs/guides/latest-model)\n- [Key concepts](https://developers.openai.com/api/docs/concepts)\n\n### Core concepts\n\n- [Responses API](https://developers.openai.com/api/docs/guides/migrate-to-responses)\n- [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state)\n- [Background mode](https://developers.openai.com/api/docs/guides/background)\n- [Streaming](https://developers.openai.com/api/docs/guides/streaming-responses)\n- [WebSocket mode](https://developers.openai.com/api/docs/guides/websocket-mode)\n- [Mid-turn steering](https://developers.openai.com/api/docs/guides/steering)\n- [Multi-agent](https://developers.openai.com/api/docs/guides/responses-multi-agent)\n- [Webhooks](https://developers.openai.com/api/docs/guides/webhooks)\n- [File inputs](https://developers.openai.com/api/docs/guides/file-inputs)\n- [Compaction](https://developers.openai.com/api/docs/guides/compaction)\n- [Counting tokens](https://developers.openai.com/api/docs/guides/token-counting)\n\n### SDKs and CLI\n\n- [OpenAI SDK](https://developers.openai.com/api/docs/libraries)\n- [OpenAI CLI](https://developers.openai.com/api/docs/libraries/openai-cli)\n\n### Resources\n\n- [Changelog](https://developers.openai.com/api/docs/changelog)\n- [Deprecations](https://developers.openai.com/api/docs/deprecations)\n- [Supported countries](https://developers.openai.com/api/docs/supported-countries)\n- [OpenAI Crawlers](https://developers.openai.com/api/docs/bots)\n- [Terms and policies](https://openai.com/policies)\n\n### Legacy APIs\n\n- Agent Builder\n\n  - [Overview](https://developers.openai.com/api/docs/guides/agent-builder)\n  - [Migration guide](https://developers.openai.com/api/docs/guides/agent-builder/migrate-from-agent-builder)\n  - [Node reference](https://developers.openai.com/api/docs/guides/node-reference)\n  - [Safety in building agents](https://developers.openai.com/api/docs/guides/agent-builder-safety)\n\n- Evals\n\n  - [Getting started](https://developers.openai.com/api/docs/guides/evaluation-getting-started)\n  - [Working with evals](https://developers.openai.com/api/docs/guides/evals)\n  - [Prompt optimizer](https://developers.openai.com/api/docs/guides/prompt-optimizer)\n  - [External models](https://developers.openai.com/api/docs/guides/external-models)\n  - [Best practices](https://developers.openai.com/api/docs/guides/evaluation-best-practices)\n  - [Graders](https://developers.openai.com/api/docs/guides/graders)\n\n- Fine-tuning\n\n  - [Optimization cycle](https://developers.openai.com/api/docs/guides/model-optimization)\n  - [Supervised fine-tuning](https://developers.openai.com/api/docs/guides/supervised-fine-tuning)\n  - [Vision fine-tuning](https://developers.openai.com/api/docs/guides/vision-fine-tuning)\n  - [Direct preference optimization](https://developers.openai.com/api/docs/guides/direct-preference-optimization)\n  - [Reinforcement fine-tuning](https://developers.openai.com/api/docs/guides/reinforcement-fine-tuning)\n  - [RFT use cases](https://developers.openai.com/api/docs/guides/rft-use-cases)\n  - [Best practices](https://developers.openai.com/api/docs/guides/fine-tuning-best-practices)\n\n- Assistants API\n\n  - [Migration guide](https://developers.openai.com/api/docs/assistants/migration)\n\n[API Dashboard](https://platform.openai.com/login)\n\n[Try ChatGPT](https://chatgpt.com/)\n\nResponses\n\nCopy Page\n\nFile input support depends on the API endpoint. The Responses API accepts the file types listed below as `input_file` items. Chat Completions accepts only PDF files as `file` content parts.\n\n| Input method | Responses API | Chat Completions |\n| --- | --- | --- |\n| Base64-encoded file data (`file_data`) | Supported file types listed below | PDF only |\n| Uploaded file ID (`file_id`) | Supported file types listed below | PDF only |\n| External file URL (`file_url`) | Supported file types listed below | Not supported |\n\nUse the Responses API for non-PDF file inputs. To use text from a file in Chat Completions, read the file in your application and send its contents as a `text` content part.\n\n## How it works\n\nIn the Responses API, `input_file` processing depends on the file type:\n\n- **PDF files**: On models with vision capabilities, such as `gpt-4o` and later models, the API extracts both text and page images and sends both to the model.\n- **Non-PDF document and text files** (for example, `.docx`, `.pptx`, `.txt`, and code files): the API extracts text only.\n- **Spreadsheet files** (for example, `.xlsx`, `.csv`, `.tsv`): the API runs a spreadsheet-specific augmentation flow (described below).\n\nUse these related tools when they better match your task:\n\n- Use [File Search](https://developers.openai.com/api/docs/guides/tools-file-search) for retrieval over large files instead of passing them directly as `input_file`.\n- Use [Hosted Shell](https://developers.openai.com/api/docs/guides/tools-shell#hosted-shell-quickstart) for spreadsheet-heavy tasks that need detailed analysis, such as aggregations, joins, charting, or custom calculations.\n\n## Non-PDF image and chart limitations\n\nFor non-PDF files, the Responses API doesn\u2019t extract embedded images or charts\ninto the model context.\n\nTo preserve chart and diagram fidelity, convert the file to PDF first, then\nsend the PDF as `input_file`.\n\n## How spreadsheet augmentation works\n\nFor spreadsheet-like files (such as `.xlsx`, `.xls`, `.csv`, `.tsv`, and\n`.iif`), the Responses API uses a spreadsheet-specific augmentation process.\n\nInstead of passing entire sheets to the model, the API parses up to the first\n1,000 rows per sheet and adds model-generated summary and header metadata so the\nmodel can work from a smaller, structured view of the data.\n\n## PDF detail levels\n\nFor PDF inputs in the Responses API, set the optional `detail` field on an\n`input_file` item to `auto`, `low`, or `high` to control how the API processes\npage images. If omitted, `detail` defaults to `auto`. For GPT-5.6 and later\nmodels, `auto` uses `high`; for earlier models, it uses `low`. Use `low` for fewer\ninput tokens, or `high` for more visual detail, such as dense charts, small print,\nor diagrams.\n\nThe `detail` setting only affects PDF page image processing. Text extracted from\nthe PDF is still included. Chat Completions file inputs don\u2019t support `detail`.\n\nA minimal Responses API request body with explicit high detail looks like this:\n\n```\n{\n  \"model\": \"gpt-4.1\",\n  \"input\": [\\\n    {\\\n      \"role\": \"user\",\\\n      \"content\": [\\\n        {\\\n          \"type\": \"input_file\",\\\n          \"filename\": \"document.pdf\",\\\n          \"file_data\": \"data:application/pdf;base64,...\",\\\n          \"detail\": \"high\"\\\n        },\\\n        {\\\n          \"type\": \"input_text\",\\\n          \"text\": \"Summarize this document.\"\\\n        }\\\n      ]\\\n    }\\\n  ]\n}\n\n\n```\n\n## Accepted file types\n\nThe following table lists common file types accepted by the Responses API as\n`input_file` items. The full list of extensions and MIME types appears later on\nthis page. Chat Completions supports only `.pdf` (`application/pdf`) for both\n`file_data` and `file_id`.\n\n| Category | Common extensions |\n| --- | --- |\n| PDF files | `.pdf` |\n| Text and code | `.txt`, `.md`, `.json`, `.html`, `.xml`, code files |\n| Rich documents | `.doc`, `.docx`, `.rtf`, `.odt` |\n| Presentations | `.ppt`, `.pptx` |\n| Spreadsheets | `.csv`, `.xls`, `.xlsx` |\n\n## File URLs\n\nYou can provide file inputs by linking external URLs.\n\nUse an external file URL\n\ncurl\n\n```\nimport OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst response = await client.responses.create({\n  model: \"gpt-6-astra\",\n  input: [\\\n    {\\\n      role: \"user\",\\\n      content: [\\\n        {\\\n          type: \"input_text\",\\\n          text: \"Analyze the letter and provide a summary of the key points.\",\\\n        },\\\n        {\\\n          type: \"input_file\",\\\n          file_url: \"https://www.berkshirehathaway.com/letters/2024ltr.pdf\",\\\n        },\\\n      ],\\\n    },\\\n  ],\n});\n\nconsole.log(response.output_text);\n```\n\n```\nfrom openai import OpenAI\n\nclient = OpenAI()\n\nresponse = client.responses.create(\n    model=\"gpt-6-astra\",\n    input=[\\\n        {\\\n            \"role\": \"user\",\\\n            \"content\": [\\\n                {\\\n                    \"type\": \"input_text\",\\\n                    \"text\": \"Analyze the letter and provide a summary of the key points.\",\\\n                },\\\n                {\\\n                    \"type\": \"input_file\",\\\n                    \"file_url\": \"https://www.berkshirehathaway.com/letters/2024ltr.pdf\",\\\n                },\\\n            ],\\\n        },\\\n    ],\n)\n\nprint(response.output_text)\n```\n\n```\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openai/openai-go/v3\"\n\t\"github.com/openai/openai-go/v3/responses\"\n)\n\nfunc main() {\n\tclient := openai.NewClient()\n\n\tresponse, err := client.Responses.New(context.Background(), responses.ResponseNewParams{\n\t\tModel: \"gpt-6-astra\",\n\t\tInput: responses.ResponseNewParamsInputUnion{\n\t\t\tOfInputItemList: responses.ResponseInputParam{\n\t\t\t\tresponses.ResponseInputItemParamOfMessage(\n\t\t\t\t\tresponses.ResponseInputMessageContentListParam{\n\t\t\t\t\t\tresponses.ResponseInputContentParamOfInputText(\n\t\t\t\t\t\t\t\"Analyze the letter and provide a summary of the key points.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tOfInputFile: &responses.ResponseInputFileParam{\n\t\t\t\t\t\t\t\tFileURL: openai.String(\n\t\t\t\t\t\t\t\t\t\"https://www.berkshirehathaway.com/letters/2024ltr.pdf\",\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tresponses.EasyInputMessageRoleUser,\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(response.OutputText())\n}\n```\n\n```\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.responses.ResponseCreateParams;\nimport com.openai.models.responses.ResponseInputFile;\nimport com.openai.models.responses.ResponseInputItem;\nimport java.util.List;\n\nResponseCreateParams params =\n    ResponseCreateParams.builder()\n        .model(\"gpt-6-astra\")\n        .inputOfResponse(\n            List.of(\n                ResponseInputItem.ofMessage(\n                    ResponseInputItem.Message.builder()\n                        .role(ResponseInputItem.Message.Role.USER)\n                        .addInputTextContent(\n                            \"Analyze the letter and provide a summary of the key points.\")\n                        .addContent(\n                            ResponseInputFile.builder()\n                                .fileUrl(\n                                    \"https://www.berkshirehathaway.com/letters/2024ltr.pdf\")\n                                .build())\n                        .build())))\n        .build();\n\nclient.responses().create(params).output().stream()\n    .flatMap(item -> item.message().stream())\n    .flatMap(message -> message.content().stream())\n    .flatMap(content -> content.outputText().stream())\n    .forEach(text -> System.out.println(text.text()));\n```\n\n```\nusing OpenAI.Responses;\n#pragma warning disable OPENAI001\n\nstring key = Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")!;\nResponsesClient client = new(key);\n\nUri fileUrl = new(\n    \"https://www.berkshirehathaway.com/letters/2024ltr.pdf\"\n);\n\nResponseResult response = await client.CreateResponseAsync(\n    \"gpt-6-astra\",\n    [\\\n        ResponseItem.CreateUserMessageItem(\\\n            [\\\n                ResponseContentPart.CreateInputTextPart(\\\n                    \"Analyze the letter and provide a summary of the key points.\"\\\n                ),\\\n                ResponseContentPart.CreateInputFilePart(fileUrl),\\\n            ]\\\n        ),\\\n    ]\n);\n\nConsole.WriteLine(response.GetOutputText());\n```\n\n```\nrequire \"openai\"\n\nopenai = OpenAI::Client.new\n\nresponse = openai.responses.create(\n  model: \"gpt-6-astra\",\n  input: [\\\n    {\\\n      role: \"user\",\\\n      content: [\\\n        {\\\n          type: \"input_text\",\\\n          text: \"Analyze the letter and provide a summary of the key points.\"\\\n        },\\\n        {\\\n          type: \"input_file\",\\\n          file_url: \"https://www.berkshirehathaway.com/letters/2024ltr.pdf\"\\\n        }\\\n      ]\\\n    }\\\n  ]\n)\n\nputs(response.output_text)\n```\n\n```\ncurl \"https://api.openai.com/v1/responses\" \\\n    -H \"Content-Type: application/json\" \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -d '{\n        \"model\": \"gpt-6-astra\",\n        \"input\": [\\\n            {\\\n                \"role\": \"user\",\\\n                \"content\": [\\\n                    {\\\n                        \"type\": \"input_text\",\\\n                        \"text\": \"Analyze the letter and provide a summary of the key points.\"\\\n                    },\\\n                    {\\\n                        \"type\": \"input_file\",\\\n                        \"file_url\": \"https://www.berkshirehathaway.com/letters/2024ltr.pdf\"\\\n                    }\\\n                ]\\\n            }\\\n        ]\n    }'\n```\n\nChat Completions does not support file URLs. Use the [Responses API](https://developers.openai.com/api/docs/guides/file-inputs?api-mode=responses#file-urls) for this option.\n\n## Uploading files\n\nThe following example uploads a file with the [Files API](https://developers.openai.com/api/docs/api-reference/files), then references its file ID in a request to the model.\n\nUpload a file\n\ncurl\n\n```\nimport fs from \"fs\";\nimport OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst file = await client.files.create({\n  file: fs.createReadStream(\"fixtures/draconomicon.pdf\"),\n  purpose: \"user_data\",\n});\n\nconst response = await client.responses.create({\n  model: \"gpt-6-astra\",\n  input: [\\\n    {\\\n      role: \"user\",\\\n      content: [\\\n        {\\\n          type: \"input_file\",\\\n          file_id: file.id,\\\n        },\\\n        {\\\n          type: \"input_text\",\\\n          text: \"What is the first dragon in the book?\",\\\n        },\\\n      ],\\\n    },\\\n  ],\n});\n\nconsole.log(response.output_text);\n```\n\n```\nfrom openai import OpenAI\n\nclient = OpenAI()\n\nfile = client.files.create(file=open(\"draconomicon.pdf\", \"rb\"), purpose=\"user_data\")\n\nresponse = client.responses.create(\n    model=\"gpt-6-astra\",\n    input=[\\\n        {\\\n            \"role\": \"user\",\\\n            \"content\": [\\\n                {\\\n                    \"type\": \"input_file\",\\\n                    \"file_id\": file.id,\\\n                },\\\n                {\\\n                    \"type\": \"input_text\",\\\n                    \"text\": \"What is the first dragon in the book?\",\\\n                },\\\n            ],\\\n        }\\\n    ],\n)\n\nprint(response.output_text)\n```\n\n```\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/openai/openai-go/v3\"\n\t\"github.com/openai/openai-go/v3/responses\"\n)\n\nfunc main() {\n\tclient := openai.NewClient()\n\n\tfile, err := os.Open(\"draconomicon.pdf\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer file.Close()\n\n\tuploadedFile, err := client.Files.New(context.Background(), openai.FileNewParams{\n\t\tFile:    file,\n\t\tPurpose: openai.FilePurposeUserData,\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresponse, err := client.Responses.New(context.Background(), responses.ResponseNewParams{\n\t\tModel: \"gpt-6-astra\",\n\t\tInput: responses.ResponseNewParamsInputUnion{\n\t\t\tOfInputItemList: responses.ResponseInputParam{\n\t\t\t\tresponses.ResponseInputItemParamOfMessage(\n\t\t\t\t\tresponses.ResponseInputMessageContentListParam{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tOfInputFile: &responses.ResponseInputFileParam{\n\t\t\t\t\t\t\t\tFileID: openai.String(uploadedFile.ID),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tresponses.ResponseInputContentParamOfInputText(\n\t\t\t\t\t\t\t\"What is the first dragon in the book?\",\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t\tresponses.EasyInputMessageRoleUser,\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(response.OutputText())\n}\n```\n\n```\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.files.FileCreateParams;\nimport com.openai.models.files.FilePurpose;\nimport com.openai.models.responses.ResponseCreateParams;\nimport com.openai.models.responses.ResponseInputFile;\nimport com.openai.models.responses.ResponseInputItem;\nimport java.nio.file.Path;\nimport java.util.List;\n\nvar file =\n    client\n        .files()\n        .create(\n            FileCreateParams.builder()\n                .file(Path.of(System.getenv(\"OPENAI_EXAMPLE_FILE_PATH\")))\n                .purpose(FilePurpose.USER_DATA)\n                .build());\n\nvar response =\n    client\n        .responses()\n        .create(\n            ResponseCreateParams.builder()\n                .model(\"gpt-6-astra\")\n                .inputOfResponse(\n                    List.of(\n                        ResponseInputItem.ofMessage(\n                            ResponseInputItem.Message.builder()\n                                .role(ResponseInputItem.Message.Role.USER)\n                                .addContent(\n                                    ResponseInputFile.builder().fileId(file.id()).build())\n                                .addInputTextContent(\"What is the first dragon in the book?\")\n                                .build())))\n                .build());\nresponse.output().stream()\n    .flatMap(item -> item.message().stream())\n    .flatMap(message -> message.content().stream())\n    .flatMap(content -> content.outputText().stream())\n    .forEach(text -> System.out.println(text.text()));\n```\n\n```\nusing OpenAI.Files;\nusing OpenAI.Responses;\n#pragma warning disable OPENAI001\n\nstring key = Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")!;\nResponsesClient client = new(key);\n\nOpenAIFileClient files = new(key);\n\nOpenAIFile file = await files.UploadFileAsync(\n    \"draconomicon.pdf\",\n    FileUploadPurpose.UserData\n);\n\nResponseResult response = await client.CreateResponseAsync(\n    \"gpt-6-astra\",\n    [\\\n        ResponseItem.CreateUserMessageItem(\\\n            [\\\n                ResponseContentPart.CreateInputFilePart(file.Id),\\\n                ResponseContentPart.CreateInputTextPart(\\\n                    \"What is the first dragon in the book?\"\\\n                ),\\\n            ]\\\n        ),\\\n    ]\n);\n\nConsole.WriteLine(response.GetOutputText());\n```\n\n```\nrequire \"openai\"\nrequire \"pathname\"\n\nopenai = OpenAI::Client.new\n\nfile = openai.files.create(\n  file: Pathname(\"draconomicon.pdf\"),\n  purpose: \"user_data\"\n)\n\nresponse = openai.responses.create(\n  model: \"gpt-6-astra\",\n  input: [\\\n    {\\\n      role: \"user\",\\\n      content: [\\\n        {\\\n          type: \"input_file\",\\\n          file_id: file.id\\\n        },\\\n        {\\\n          type: \"input_text\",\\\n          text: \"What is the first dragon in the book?\"\\\n        }\\\n      ]\\\n    }\\\n  ]\n)\n\nputs(response.output_text)\n```\n\n```\ncurl https://api.openai.com/v1/files \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -F purpose=\"user_data\" \\\n    -F file=\"@draconomicon.pdf\"\n\ncurl \"https://api.openai.com/v1/responses\" \\\n    -H \"Content-Type: application/json\" \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -d '{\n        \"model\": \"gpt-6-astra\",\n        \"input\": [\\\n            {\\\n                \"role\": \"user\",\\\n                \"content\": [\\\n                    {\\\n                        \"type\": \"input_file\",\\\n                        \"file_id\": \"file-6F2ksmvXxt4VdoqmHRw6kL\"\\\n                    },\\\n                    {\\\n                        \"type\": \"input_text\",\\\n                        \"text\": \"What is the first dragon in the book?\"\\\n                    }\\\n                ]\\\n            }\\\n        ]\n    }'\n```\n\nUpload a file\n\ncurl\n\n```\nimport fs from \"fs\";\nimport OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst file = await client.files.create({\n  file: fs.createReadStream(\"fixtures/draconomicon.pdf\"),\n  purpose: \"user_data\",\n});\n\nconst completion = await client.chat.completions.create({\n  model: \"gpt-6-astra\",\n  messages: [\\\n    {\\\n      role: \"user\",\\\n      content: [\\\n        {\\\n          type: \"file\",\\\n          file: {\\\n            file_id: file.id,\\\n          },\\\n        },\\\n        {\\\n          type: \"text\",\\\n          text: \"What is the first dragon in the book?\",\\\n        },\\\n      ],\\\n    },\\\n  ],\n});\n\nconsole.log(completion.choices[0].message.content);\n```\n\n```\nfrom openai import OpenAI\n\nclient = OpenAI()\n\nfile = client.files.create(file=open(\"draconomicon.pdf\", \"rb\"), purpose=\"user_data\")\n\ncompletion = client.chat.completions.create(\n    model=\"gpt-6-astra\",\n    messages=[\\\n        {\\\n            \"role\": \"user\",\\\n            \"content\": [\\\n                {\\\n                    \"type\": \"file\",\\\n                    \"file\": {\\\n                        \"file_id\": file.id,\\\n                    },\\\n                },\\\n                {\\\n                    \"type\": \"text\",\\\n                    \"text\": \"What is the first dragon in the book?\",\\\n                },\\\n            ],\\\n        }\\\n    ],\n)\n\nprint(completion.choices[0].message.content)\n```\n\n```\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/openai/openai-go/v3\"\n)\n\nfunc main() {\n\tclient := openai.NewClient()\n\n\tfile, err := os.Open(\"draconomicon.pdf\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer file.Close()\n\n\tuploadedFile, err := client.Files.New(context.Background(), openai.FileNewParams{\n\t\tFile:    file,\n\t\tPurpose: openai.FilePurposeUserData,\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tcompletion, err := client.Chat.Completions.New(context.Background(), openai.ChatCompletionNewParams{\n\t\tModel: \"gpt-6-astra\",\n\t\tMessages: []openai.ChatCompletionMessageParamUnion{\n\t\t\topenai.UserMessage([]openai.ChatCompletionContentPartUnionParam{\n\t\t\t\topenai.FileContentPart(openai.ChatCompletionContentPartFileFileParam{\n\t\t\t\t\tFileID: openai.String(uploadedFile.ID),\n\t\t\t\t}),\n\t\t\t\topenai.TextContentPart(\"What is the first dragon in the book?\"),\n\t\t\t}),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(completion.Choices[0].Message.Content)\n}\n```\n\n```\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.chat.completions.ChatCompletionContentPart;\nimport com.openai.models.chat.completions.ChatCompletionContentPartText;\nimport com.openai.models.chat.completions.ChatCompletionCreateParams;\nimport com.openai.models.chat.completions.ChatCompletionUserMessageParam;\nimport com.openai.models.files.FileCreateParams;\nimport com.openai.models.files.FilePurpose;\nimport java.nio.file.Path;\nimport java.util.List;\n\nvar file =\n    client\n        .files()\n        .create(\n            FileCreateParams.builder()\n                .file(Path.of(System.getenv(\"OPENAI_EXAMPLE_FILE_PATH\")))\n                .purpose(FilePurpose.USER_DATA)\n                .build());\n\nvar filePart =\n    ChatCompletionContentPart.ofFile(\n        ChatCompletionContentPart.File.builder()\n            .file(ChatCompletionContentPart.File.FileObject.builder().fileId(file.id()).build())\n            .build());\nvar textPart =\n    ChatCompletionContentPart.ofText(\n        ChatCompletionContentPartText.builder().text(\"Summarize this PDF.\").build());\nvar completion =\n    client\n        .chat()\n        .completions()\n        .create(\n            ChatCompletionCreateParams.builder()\n                .model(\"gpt-6-astra\")\n                .addMessage(\n                    ChatCompletionUserMessageParam.builder()\n                        .contentOfArrayOfContentParts(List.of(filePart, textPart))\n                        .build())\n                .build());\ncompletion.choices().stream()\n    .flatMap(choice -> choice.message().content().stream())\n    .forEach(System.out::println);\n```\n\n```\nusing OpenAI.Chat;\nusing OpenAI.Files;\n#pragma warning disable OPENAI001\n\nstring key = Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")!;\nstring model = \"gpt-6-astra\";\nChatClient client = new(model, key);\n\nOpenAIFileClient files = new(key);\n\nOpenAIFile file = await files.UploadFileAsync(\"draconomicon.pdf\", FileUploadPurpose.UserData);\n\nChatCompletion completion = await client.CompleteChatAsync(\n    new UserChatMessage(\n        [\\\n            ChatMessageContentPart.CreateFilePart(file.Id),\\\n            ChatMessageContentPart.CreateTextPart(\"What is the first dragon in the book?\"),\\\n        ]\n    )\n);\n\nConsole.WriteLine(completion.Content[0].Text);\n```\n\n```\nrequire \"openai\"\nrequire \"pathname\"\n\nclient = OpenAI::Client.new\nfile = client.files.create(\n  file: Pathname(\"draconomicon.pdf\"),\n  purpose: :user_data\n)\ncompletion = client.chat.completions.create(\n  model: \"gpt-6-astra\",\n  messages: [\\\n    {\\\n      role: :user,\\\n      content: [\\\n        {\\\n          type: :file,\\\n          file: { file_id: file.id }\\\n        },\\\n        {\\\n          type: :text,\\\n          text: \"Summarize this PDF.\"\\\n        }\\\n      ]\\\n    }\\\n  ]\n)\n\nputs(completion.choices.fetch(0).message.content)\n```\n\n```\ncurl https://api.openai.com/v1/files \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -F purpose=\"user_data\" \\\n    -F file=\"@draconomicon.pdf\"\n\ncurl \"https://api.openai.com/v1/chat/completions\" \\\n    -H \"Content-Type: application/json\" \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -d '{\n        \"model\": \"gpt-6-astra\",\n        \"messages\": [\\\n            {\\\n                \"role\": \"user\",\\\n                \"content\": [\\\n                    {\\\n                        \"type\": \"file\",\\\n                        \"file\": {\\\n                            \"file_id\": \"file-6F2ksmvXxt4VdoqmHRw6kL\"\\\n                        }\\\n                    },\\\n                    {\\\n                        \"type\": \"text\",\\\n                        \"text\": \"What is the first dragon in the book?\"\\\n                    }\\\n                ]\\\n            }\\\n        ]\n    }'\n```\n\n## Base64-encoded files\n\nYou can also send file inputs as Base64-encoded file data.\n\nSend a Base64-encoded file\n\ncurl\n\n```\nimport fs from \"fs\";\nimport OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst data = fs.readFileSync(\"fixtures/draconomicon.pdf\");\nconst base64String = data.toString(\"base64\");\n\nconst response = await client.responses.create({\n  model: \"gpt-6-astra\",\n  input: [\\\n    {\\\n      role: \"user\",\\\n      content: [\\\n        {\\\n          type: \"input_file\",\\\n          filename: \"draconomicon.pdf\",\\\n          file_data: `data:application/pdf;base64,${base64String}`,\\\n        },\\\n        {\\\n          type: \"input_text\",\\\n          text: \"What is the first dragon in the book?\",\\\n        },\\\n      ],\\\n    },\\\n  ],\n});\n\nconsole.log(response.output_text);\n```\n\n```\nimport base64\nfrom openai import OpenAI\n\nclient = OpenAI()\n\nwith open(\"draconomicon.pdf\", \"rb\") as f:\n    data = f.read()\n\nbase64_string = base64.b64encode(data).decode(\"utf-8\")\n\nresponse = client.responses.create(\n    model=\"gpt-6-astra\",\n    input=[\\\n        {\\\n            \"role\": \"user\",\\\n            \"content\": [\\\n                {\\\n                    \"type\": \"input_file\",\\\n                    \"filename\": \"draconomicon.pdf\",\\\n                    \"file_data\": f\"data:application/pdf;base64,{base64_string}\",\\\n                },\\\n                {\\\n                    \"type\": \"input_text\",\\\n                    \"text\": \"What is the first dragon in the book?\",\\\n                },\\\n            ],\\\n        },\\\n    ],\n)\n\nprint(response.output_text)\n```\n\n```\npackage main\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/openai/openai-go/v3\"\n\t\"github.com/openai/openai-go/v3/responses\"\n)\n\nfunc main() {\n\tclient := openai.NewClient()\n\n\tdata, err := os.ReadFile(\"draconomicon.pdf\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfileData := \"data:application/pdf;base64,\" + base64.StdEncoding.EncodeToString(data)\n\n\tresponse, err := client.Responses.New(context.Background(), responses.ResponseNewParams{\n\t\tModel: \"gpt-6-astra\",\n\t\tInput: responses.ResponseNewParamsInputUnion{\n\t\t\tOfInputItemList: responses.ResponseInputParam{\n\t\t\t\tresponses.ResponseInputItemParamOfMessage(\n\t\t\t\t\tresponses.ResponseInputMessageContentListParam{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tOfInputFile: &responses.ResponseInputFileParam{\n\t\t\t\t\t\t\t\tFilename: openai.String(\"draconomicon.pdf\"),\n\t\t\t\t\t\t\t\tFileData: openai.String(fileData),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tresponses.ResponseInputContentParamOfInputText(\n\t\t\t\t\t\t\t\"What is the first dragon in the book?\",\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t\tresponses.EasyInputMessageRoleUser,\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(response.OutputText())\n}\n```\n\n```\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.responses.ResponseCreateParams;\nimport com.openai.models.responses.ResponseInputFile;\nimport com.openai.models.responses.ResponseInputItem;\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.Base64;\nimport java.util.List;\n\nString pdfData =\n    Base64.getEncoder()\n        .encodeToString(Files.readAllBytes(Path.of(System.getenv(\"OPENAI_EXAMPLE_FILE_PATH\"))));\nResponseCreateParams params =\n    ResponseCreateParams.builder()\n        .model(\"gpt-6-astra\")\n        .inputOfResponse(\n            List.of(\n                ResponseInputItem.ofMessage(\n                    ResponseInputItem.Message.builder()\n                        .role(ResponseInputItem.Message.Role.USER)\n                        .addContent(\n                            ResponseInputFile.builder()\n                                .filename(\"document.pdf\")\n                                .fileData(\"data:application/pdf;base64,\" + pdfData)\n                                .build())\n                        .addInputTextContent(\"Summarize this document.\")\n                        .build())))\n        .build();\n\nclient.responses().create(params).output().stream()\n    .flatMap(item -> item.message().stream())\n    .flatMap(message -> message.content().stream())\n    .flatMap(content -> content.outputText().stream())\n    .forEach(text -> System.out.println(text.text()));\n```\n\n```\nusing OpenAI.Responses;\n#pragma warning disable OPENAI001\n\nstring key = Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")!;\nResponsesClient client = new(key);\n\nBinaryData fileBytes = BinaryData.FromBytes(await File.ReadAllBytesAsync(\"draconomicon.pdf\"));\nResponseResult response = await client.CreateResponseAsync(\n    \"gpt-6-astra\",\n    [\\\n        ResponseItem.CreateUserMessageItem(\\\n            [\\\n                ResponseContentPart.CreateInputFilePart(\\\n                    fileBytes,\\\n                    \"application/pdf\",\\\n                    \"draconomicon.pdf\"\\\n                ),\\\n                ResponseContentPart.CreateInputTextPart(\\\n                    \"What is the first dragon in the book?\"\\\n                ),\\\n            ]\\\n        ),\\\n    ]\n);\n\nConsole.WriteLine(response.GetOutputText());\n```\n\n```\nrequire \"base64\"\nrequire \"openai\"\n\nclient = OpenAI::Client.new\npdf_data = Base64.strict_encode64(File.binread(\"draconomicon.pdf\"))\nresponse = client.responses.create(\n  model: \"gpt-6-astra\",\n  input: [\\\n    {\\\n      role: :user,\\\n      content: [\\\n        {\\\n          type: :input_file,\\\n          filename: \"document.pdf\",\\\n          file_data: \"data:application/pdf;base64,#{pdf_data}\"\\\n        },\\\n        {\\\n          type: :input_text,\\\n          text: \"Summarize this document.\"\\\n        }\\\n      ]\\\n    }\\\n  ]\n)\n\nputs(response.output_text)\n```\n\n```\ncurl \"https://api.openai.com/v1/responses\" \\\n    -H \"Content-Type: application/json\" \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -d '{\n        \"model\": \"gpt-6-astra\",\n        \"input\": [\\\n            {\\\n                \"role\": \"user\",\\\n                \"content\": [\\\n                    {\\\n                        \"type\": \"input_file\",\\\n                        \"filename\": \"draconomicon.pdf\",\\\n                        \"file_data\": \"...base64 encoded PDF bytes here...\"\\\n                    },\\\n                    {\\\n                        \"type\": \"input_text\",\\\n                        \"text\": \"What is the first dragon in the book?\"\\\n                    }\\\n                ]\\\n            }\\\n        ]\n    }'\n```\n\nSend a Base64-encoded file\n\ncurl\n\n```\nimport fs from \"fs\";\nimport OpenAI from \"openai\";\nconst client = new OpenAI();\n\nconst data = fs.readFileSync(\"fixtures/draconomicon.pdf\");\nconst base64String = data.toString(\"base64\");\n\nconst completion = await client.chat.completions.create({\n  model: \"gpt-6-astra\",\n  messages: [\\\n    {\\\n      role: \"user\",\\\n      content: [\\\n        {\\\n          type: \"file\",\\\n          file: {\\\n            filename: \"draconomicon.pdf\",\\\n            file_data: `data:application/pdf;base64,${base64String}`,\\\n          },\\\n        },\\\n        {\\\n          type: \"text\",\\\n          text: \"What is the first dragon in the book?\",\\\n        },\\\n      ],\\\n    },\\\n  ],\n});\n\nconsole.log(completion.choices[0].message.content);\n```\n\n```\nimport base64\nfrom openai import OpenAI\n\nclient = OpenAI()\n\nwith open(\"draconomicon.pdf\", \"rb\") as f:\n    data = f.read()\n\nbase64_string = base64.b64encode(data).decode(\"utf-8\")\n\ncompletion = client.chat.completions.create(\n    model=\"gpt-6-astra\",\n    messages=[\\\n        {\\\n            \"role\": \"user\",\\\n            \"content\": [\\\n                {\\\n                    \"type\": \"file\",\\\n                    \"file\": {\\\n                        \"filename\": \"draconomicon.pdf\",\\\n                        \"file_data\": f\"data:application/pdf;base64,{base64_string}\",\\\n                    },\\\n                },\\\n                {\\\n                    \"type\": \"text\",\\\n                    \"text\": \"What is the first dragon in the book?\",\\\n                },\\\n            ],\\\n        },\\\n    ],\n)\n\nprint(completion.choices[0].message.content)\n```\n\n```\npackage main\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/openai/openai-go/v3\"\n)\n\nfunc main() {\n\tclient := openai.NewClient()\n\n\tdata, err := os.ReadFile(\"draconomicon.pdf\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfileData := \"data:application/pdf;base64,\" + base64.StdEncoding.EncodeToString(data)\n\n\tcompletion, err := client.Chat.Completions.New(context.Background(), openai.ChatCompletionNewParams{\n\t\tModel: \"gpt-6-astra\",\n\t\tMessages: []openai.ChatCompletionMessageParamUnion{\n\t\t\topenai.UserMessage([]openai.ChatCompletionContentPartUnionParam{\n\t\t\t\topenai.FileContentPart(openai.ChatCompletionContentPartFileFileParam{\n\t\t\t\t\tFilename: openai.String(\"draconomicon.pdf\"),\n\t\t\t\t\tFileData: openai.String(fileData),\n\t\t\t\t}),\n\t\t\t\topenai.TextContentPart(\"What is the first dragon in the book?\"),\n\t\t\t}),\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(completion.Choices[0].Message.Content)\n}\n```\n\n```\nimport com.openai.client.OpenAIClient;\nimport com.openai.client.okhttp.OpenAIOkHttpClient;\nimport com.openai.models.chat.completions.ChatCompletionContentPart;\nimport com.openai.models.chat.completions.ChatCompletionContentPartText;\nimport com.openai.models.chat.completions.ChatCompletionCreateParams;\nimport com.openai.models.chat.completions.ChatCompletionUserMessageParam;\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.Base64;\nimport java.util.List;\n\nString encoded =\n    Base64.getEncoder()\n        .encodeToString(Files.readAllBytes(Path.of(System.getenv(\"OPENAI_EXAMPLE_FILE_PATH\"))));\nChatCompletionContentPart file =\n    ChatCompletionContentPart.ofFile(\n        ChatCompletionContentPart.File.builder()\n            .file(\n                ChatCompletionContentPart.File.FileObject.builder()\n                    .filename(\"document.pdf\")\n                    .fileData(\"data:application/pdf;base64,\" + encoded)\n                    .build())\n            .build());\nChatCompletionContentPart text =\n    ChatCompletionContentPart.ofText(\n        ChatCompletionContentPartText.builder().text(\"Summarize this document.\").build());\n\nChatCompletionCreateParams params =\n    ChatCompletionCreateParams.builder()\n        .model(\"gpt-6-astra\")\n        .addMessage(\n            ChatCompletionUserMessageParam.builder()\n                .contentOfArrayOfContentParts(List.of(file, text))\n                .build())\n        .build();\n\nclient.chat().completions().create(params).choices().stream()\n    .flatMap(choice -> choice.message().content().stream())\n    .forEach(System.out::println);\n```\n\n```\nusing OpenAI.Chat;\n#pragma warning disable OPENAI001\n\nstring key = Environment.GetEnvironmentVariable(\"OPENAI_API_KEY\")!;\nstring model = \"gpt-6-astra\";\nChatClient client = new(model, key);\n\nBinaryData fileBytes = BinaryData.FromBytes(await File.ReadAllBytesAsync(\"draconomicon.pdf\"));\nChatCompletion completion = await client.CompleteChatAsync(\n    new UserChatMessage(\n        [\\\n            ChatMessageContentPart.CreateFilePart(\\\n                fileBytes,\\\n                \"application/pdf\",\\\n                \"draconomicon.pdf\"\\\n            ),\\\n            ChatMessageContentPart.CreateTextPart(\"What is the first dragon in the book?\"),\\\n        ]\n    )\n);\n\nConsole.WriteLine(completion.Content[0].Text);\n```\n\n```\nrequire \"base64\"\nrequire \"openai\"\n\nclient = OpenAI::Client.new\npdf_data = Base64.strict_encode64(File.binread(\"draconomicon.pdf\"))\ncompletion = client.chat.completions.create(\n  model: \"gpt-6-astra\",\n  messages: [\\\n    {\\\n      role: :user,\\\n      content: [\\\n        {\\\n          type: :file,\\\n          file: {\\\n            filename: \"document.pdf\",\\\n            file_data: \"data:application/pdf;base64,#{pdf_data}\"\\\n          }\\\n        },\\\n        {\\\n          type: :text,\\\n          text: \"Summarize this document.\"\\\n        }\\\n      ]\\\n    }\\\n  ]\n)\n\nputs(completion.choices.fetch(0).message.content)\n```\n\n```\ncurl \"https://api.openai.com/v1/chat/completions\" \\\n    -H \"Content-Type: application/json\" \\\n    -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n    -d '{\n        \"model\": \"gpt-6-astra\",\n        \"messages\": [\\\n            {\\\n                \"role\": \"user\",\\\n                \"content\": [\\\n                    {\\\n                        \"type\": \"file\",\\\n                        \"file\": {\\\n                            \"filename\": \"draconomicon.pdf\",\\\n                            \"file_data\": \"...base64 encoded bytes here...\"\\\n                        }\\\n                    },\\\n                    {\\\n                        \"type\": \"text\",\\\n                        \"text\": \"What is the first dragon in the book?\"\\\n                    }\\\n                ]\\\n            }\\\n        ]\n    }'\n```\n\n## Usage considerations\n\nKeep these constraints in mind when you use file inputs:\n\n- **Token usage:** PDF parsing includes both extracted text and page images in context, which can increase token usage. In the Responses API, set `detail` to `auto` (the default), `low`, or `high` to control the amount of visual detail for PDF page images. Before deploying at scale, review pricing and token implications. [More on pricing](https://developers.openai.com/api/docs/pricing).\n- **File size limits:** A single request can include more than one file, but each file must be under 50 MB. The combined limit across all files in the request is 50 MB.\n- **Supported models:** PDF parsing that includes text and page images requires models with vision capabilities, such as `gpt-4o` and later models.\n- **File upload purpose:** You can upload files with any supported [purpose](https://developers.openai.com/api/docs/api-reference/files/create#files-create-purpose), but use `user_data` for files you plan to pass as model inputs.\n\n## Full list of accepted file types\n\nThis list applies to the Responses API. Chat Completions supports only `.pdf`\n(`application/pdf`) for both `file_data` and `file_id`.\n\n| Category | Extensions | MIME types |\n| --- | --- | --- |\n| PDF files | PDF files (`.pdf`) | `application/pdf` |\n| Spreadsheets | Excel sheets (`.xla`, `.xlb`, `.xlc`, `.xlm`, `.xls`, `.xlsx`, `.xlt`, `.xlw`) | `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`, `application/vnd.ms-excel` |\n| Spreadsheets | CSV / TSV / IIF (`.csv`, `.tsv`, `.iif`), Google Sheets | `text/csv`, `application/csv`, `text/tsv`, `text/x-iif`, `application/x-iif`, `application/vnd.google-apps.spreadsheet` |\n| Rich documents | Word/ODT/RTF docs (`.doc`, `.docx`, `.dot`, `.odt`, `.rtf`), Pages, Google Docs | `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `application/msword`, `application/rtf`, `text/rtf`, `application/vnd.oasis.opendocument.text`, `application/vnd.apple.pages`, `application/vnd.google-apps.document`, `application/vnd.apple.iwork` |\n| Presentations | PowerPoint slides (`.pot`, `.ppa`, `.pps`, `.ppt`, `.pptx`, `.pwz`, `.wiz`), Keynote, Google Slides | `application/vnd.openxmlformats-officedocument.presentationml.presentation`, `application/vnd.ms-powerpoint`, `application/vnd.apple.keynote`, `application/vnd.google-apps.presentation`, `application/vnd.apple.iwork` |\n| Text and code | Text/code formats (`.asm`, `.bat`, `.c`, `.cc`, `.conf`, `.cpp`, `.css`, `.cxx`, `.def`, `.dic`, `.eml`, `.h`, `.hh`, `.htm`, `.html`, `.ics`, `.ifb`, `.in`, `.js`, `.json`, `.ksh`, `.list`, `.log`, `.markdown`, `.md`, `.mht`, `.mhtml`, `.mime`, `.mjs`, `.nws`, `.pl`, `.py`, `.rst`, `.s`, `.sql`, `.srt`, `.text`, `.txt`, `.vcf`, `.vtt`, `.xml`) | `application/javascript`, `application/typescript`, `text/xml`, `text/x-shellscript`, `text/x-rst`, `text/x-makefile`, `text/x-lisp`, `text/x-asm`, `text/vbscript`, `text/css`, `message/rfc822`, `application/x-sql`, `application/x-scala`, `application/x-rust`, `application/x-powershell`, `text/x-diff`, `text/x-patch`, `application/x-patch`, `text/plain`, `text/markdown`, `text/x-java`, `text/x-script.python`, `text/x-python`, `text/x-c`, `text/x-c++`, `text/x-golang`, `text/html`, `text/x-php`, `application/x-php`, `application/x-httpd-php`, `application/x-httpd-php-source`, `text/x-ruby`, `text/x-sh`, `text/x-bash`, `application/x-bash`, `text/x-zsh`, `text/x-tex`, `text/x-csharp`, `application/json`, `text/x-typescript`, `text/javascript`, `text/x-go`, `text/x-rust`, `text/x-scala`, `text/x-kotlin`, `text/x-swift`, `text/x-lua`, `text/x-r`, `text/x-R`, `text/x-julia`, `text/x-perl`, `text/x-objectivec`, `text/x-objectivec++`, `text/x-erlang`, `text/x-elixir`, `text/x-haskell`, `text/x-clojure`, `text/x-groovy`, `text/x-dart`, `text/x-awk`, `application/x-awk`, `text/jsx`, `text/tsx`, `text/x-handlebars`, `text/x-mustache`, `text/x-ejs`, `text/x-jinja2`, `text/x-liquid`, `text/x-erb`, `text/x-twig`, `text/x-pug`, `text/x-jade`, `text/x-tmpl`, `text/x-cmake`, `text/x-dockerfile`, `text/x-gradle`, `text/x-ini`, `text/x-properties`, `text/x-protobuf`, `application/x-protobuf`, `text/x-sql`, `text/x-sass`, `text/x-scss`, `text/x-less`, `text/x-hcl`, `text/x-terraform`, `application/x-terraform`, `text/x-toml`, `application/x-toml`, `application/graphql`, `application/x-graphql`, `text/x-graphql`, `application/x-ndjson`, `application/json5`, `application/x-json5`, `text/x-yaml`, `application/toml`, `application/x-yaml`, `application/yaml`, `text/x-astro`, `text/srt`, `application/x-subrip`, `text/x-subrip`, `text/vtt`, `text/x-vcard`, `text/calendar` |\n\n## Next steps\n\nNext, you might want to explore one of these resources:\n\n[Experiment with file inputs in the Playground\\\\\n\\\\\nUse the Playground to develop and iterate on prompts with file inputs.](https://platform.openai.com/chat/edit)\n\n[Full API reference\\\\\n\\\\\nCheck out the API reference for more options.](https://developers.openai.com/api/docs/api-reference/responses)\n\n[Use File Search for large corpora\\\\\n\\\\\nUse retrieval over chunked files when you need scalable search instead of\\\\\nsending whole files in a single context window.](https://developers.openai.com/api/docs/guides/tools-file-search)\n\n[Use Hosted Shell for deep spreadsheet analysis\\\\\n\\\\\nUse Hosted Shell for advanced spreadsheet workflows such as joins,\\\\\naggregations, and charting.](https://developers.openai.com/api/docs/guides/tools-shell#hosted-shell-quickstart)\n\nAsk AI\n\nLoading docs agent..."
          }
        },
        {
          "url": "https://community.openai.com/t/20-files-per-assistant-clarification/479659",
          "title": "20 files per assistant clarification - API - OpenAI Developer ...",
          "description": "\u201cYou can attach a maximum of 20 files per Assistant, and they can be at most 512 MB each.\u201d Can someone clarify this for me? I should technically be able to have one assistant with the same instruction and model power thousands of threads. If anything, I\u2019d think the file limit would be ...",
          "thumbnail_url": "https://us1.discourse-cdn.com/openai1/original/4X/0/4/c/04c8546833f0824a49d21f50e2b08dd44bfd3d05.png",
          "original_thumbnail_url": "https://us1.discourse-cdn.com/openai1/original/4X/0/4/c/04c8546833f0824a49d21f50e2b08dd44bfd3d05.png",
          "page_age": "2023-11-07T18:24:06",
          "favicon_url": "https://you.com/favicon?domain=community.openai.com&size=128",
          "snippets": [
            "\u201cYou can attach a maximum of 20 files per Assistant, and they can be at most 512 MB each.\u201d Can someone clarify this for me? I should technically be able to have one assistant with the same instruction and model power thousands of threads. If anything, I\u2019d think the file limit would be at the thread level, not the assistant.",
            "\u201cYou can attach a maximum of 20 files per Assistant, and they can be at most 512 MB each.\u201d Can someone clarify this for me? I should technically be able to have one assistant with the same instruction and model power t\u2026"
          ],
          "contents": {
            "markdown": "[Skip to last reply](https://community.openai.com/t/20-files-per-assistant-clarification/479659/16) [Skip to top](https://community.openai.com/t/20-files-per-assistant-clarification/479659/1)\n\n[Skip to main content](https://community.openai.com/t/20-files-per-assistant-clarification/479659#main-container)\n\n# [20 files per assistant clarification](https://community.openai.com/t/20-files-per-assistant-clarification/479659)\n\n[API](https://community.openai.com/c/api/7)\n\n- [api](https://community.openai.com/tag/api/33)\n\nYou have selected **0** posts.\n\n[select all](https://community.openai.com/t/20-files-per-assistant-clarification/479659)\n\n[cancel selecting](https://community.openai.com/t/20-files-per-assistant-clarification/479659)\n\n9.3k\nviews\n12\nlikes\n12\nusers\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/darcschnider/48/190437_2.png)3](https://community.openai.com/u/darcschnider \"darcschnider\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/excelformulabot.com/48/11306_2.png)2](https://community.openai.com/u/excelformulabot.com \"excelformulabot.com\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/somebodysysop/48/17613_2.png)2](https://community.openai.com/u/SomebodySysop \"SomebodySysop\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/john_g/48/146819_2.png)](https://community.openai.com/u/John_G \"John_G\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/benjamin1254/48/237414_2.png)](https://community.openai.com/u/benjamin1254 \"benjamin1254\")\n\nread\n4\nmin\n\n\nSummarize\n\n[Nov 2023](https://community.openai.com/t/20-files-per-assistant-clarification/479659/1 \"Jump to the first post\")\n\n1 / 16\n\n\nNov 2023\n\n\n[Nov 2023](https://community.openai.com/t/20-files-per-assistant-clarification/479659/16)\n\n## post by excelformulabot.com on Nov 7, 2023\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/excelformulabot.com/48/11306_2.png)](https://community.openai.com/u/excelformulabot.com)\n\n[excelformulabot.com](https://community.openai.com/u/excelformulabot.com)\n\n[Nov 2023](https://community.openai.com/t/20-files-per-assistant-clarification/479659 \"Post date\")\n\n\u201cYou can attach a maximum of 20 files per Assistant, and they can be at most 512 MB each.\u201d\n\nCan someone clarify this for me?\n\nI should technically be able to have one assistant with the same instruction and model power thousands of threads.\n\nIf anything, I\u2019d think the file limit would be at the thread level, not the assistant.\n\nMy app allows users to upload their own files, thus this wouldn\u2019t be a scalable solution.\n\nMe too\n\n9.3k\nviews\n12\nlikes\n12\nusers\n\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/darcschnider/48/190437_2.png)3](https://community.openai.com/u/darcschnider \"darcschnider\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/excelformulabot.com/48/11306_2.png)2](https://community.openai.com/u/excelformulabot.com \"excelformulabot.com\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/somebodysysop/48/17613_2.png)2](https://community.openai.com/u/SomebodySysop \"SomebodySysop\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/john_g/48/146819_2.png)](https://community.openai.com/u/John_G \"John_G\")\n\n[![](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/benjamin1254/48/237414_2.png)](https://community.openai.com/u/benjamin1254 \"benjamin1254\")\n\nread\n4\nmin\n\n\nSummarize\n\n## post by ryandetzel on Nov 7, 2023\n\n## post by excelformulabot.com on Nov 7, 2023\n\n## post by benjamin1254 on Nov 7, 2023\n\n## post by darcschnider on Nov 7, 2023\n\n## post by lombax85 on Nov 7, 2023\n\n## post by darcschnider on Nov 7, 2023\n\n## post by alden on Nov 8, 2023\n\n## post by John\\_G on Nov 8, 2023\n\n## post by joshg on Nov 8, 2023\n\n## post by SomebodySysop on Nov 8, 2023\n\n## post by SomebodySysop on Nov 8, 2023\n\n## post by darcschnider on Nov 10, 2023\n\n## post by yazoooo on Nov 12, 2023\n\n## post by christian.lembke on Nov 12, 2023\n\n## post by Rabble on Nov 15, 2023\n\nReply\n\n### Related topics\n\n| Topic | Replies | Views | Activity |\n| --- | --- | --- | --- |\n| [AI assistants file limits](https://community.openai.com/t/ai-assistants-file-limits/566434)<br>[API](https://community.openai.com/c/api/7) <br>- [assistants-api](https://community.openai.com/tag/assistants-api/355) | [10](https://community.openai.com/t/ai-assistants-file-limits/566434/1) | 13.9k | [Oct 2024](https://community.openai.com/t/ai-assistants-file-limits/566434/11) |\n| [Failed to index file File contains too may tokens. Max allowed tokens per file is 2000000](https://community.openai.com/t/failed-to-index-file-file-contains-too-may-tokens-max-allowed-tokens-per-file-is-2000000/512298)<br>[API](https://community.openai.com/c/api/7) <br>- [api](https://community.openai.com/tag/api/33),<br>- [assistants](https://community.openai.com/tag/assistants/345) | [22](https://community.openai.com/t/failed-to-index-file-file-contains-too-may-tokens-max-allowed-tokens-per-file-is-2000000/512298/1) | 5.0k | [Mar 2024](https://community.openai.com/t/failed-to-index-file-file-contains-too-may-tokens-max-allowed-tokens-per-file-is-2000000/512298/23) |\n| [New \u201cAssistants\u201d API a potential replacement for low level \u201cRAG\u201d style content generation?](https://community.openai.com/t/new-assistants-api-a-potential-replacement-for-low-level-rag-style-content-generation/475677)<br>[API](https://community.openai.com/c/api/7) | [9](https://community.openai.com/t/new-assistants-api-a-potential-replacement-for-low-level-rag-style-content-generation/475677/1) | 9.0k | [Mar 2024](https://community.openai.com/t/new-assistants-api-a-potential-replacement-for-low-level-rag-style-content-generation/475677/10) |\n| [In Assistants, Is there a limit to File size and number of files?](https://community.openai.com/t/in-assistants-is-there-a-limit-to-file-size-and-number-of-files/477422)<br>[API](https://community.openai.com/c/api/7) | [6](https://community.openai.com/t/in-assistants-is-there-a-limit-to-file-size-and-number-of-files/477422/1) | 9.3k | [Nov 2023](https://community.openai.com/t/in-assistants-is-there-a-limit-to-file-size-and-number-of-files/477422/7) |\n| [Assistants Bugs in Playground](https://community.openai.com/t/assistants-bugs-in-playground/476549)<br>[Bugs](https://community.openai.com/c/api/bugs/30) <br>- [assistants](https://community.openai.com/tag/assistants/345),<br>- [threads](https://community.openai.com/tag/threads/352) | [32](https://community.openai.com/t/assistants-bugs-in-playground/476549/1) | 5.5k | [Nov 2023](https://community.openai.com/t/assistants-bugs-in-playground/476549/33) |\n\nTopic list, column headers with buttons are sortable.\n\nDeveloper Community\n\n\nConnect with other developers building with the OpenAI Platform.\n\n\nHelp\n\n\n- [Support](https://help.openai.com/en/articles/6614161-how-can-i-contact-support)\n\nDeveloper Resources\n\n\n- [API Documentation](https://platform.openai.com/overview)\n- [Service status](https://status.openai.com/)\n- [Cookbook](https://github.com/openai/openai-cookbook)\n\n[Terms & policies](https://openai.com/policies) [Privacy policy](https://openai.com/policies/privacy-policy)"
          }
        }
      ]
    },
    "metadata": {
      "query": "What is the maximum size of an individual file I can upload through OpenAI's Files API?",
      "search_uuid": "a2eedcbf-d958-41fa-87ff-f1ef72df916c",
      "latency": 12.665504725184292
    }
  },
  "credits_reported": null,
  "tokens_reported": null,
  "shared_http_call": true
}