SPB Git

Repository Public

file-inputs.md 41.5 KB 903 lines markdown

1# File inputs23> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.45File 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.67| Input method                           | Responses API                     | Chat Completions |8| -------------------------------------- | --------------------------------- | ---------------- |9| Base64-encoded file data (`file_data`) | Supported file types listed below | PDF only         |10| Uploaded file ID (`file_id`)           | Supported file types listed below | PDF only         |11| External file URL (`file_url`)         | Supported file types listed below | Not supported    |1213Use 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.1415## How it works1617In the Responses API, `input_file` processing depends on the file type:1819- **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.20- **Non-PDF document and text files** (for example, `.docx`, `.pptx`, `.txt`, and code files): the API extracts text only.21- **Spreadsheet files** (for example, `.xlsx`, `.csv`, `.tsv`): the API runs a spreadsheet-specific augmentation flow (described below).2223Use these related tools when they better match your task:2425- 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`.26- 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.2728## Non-PDF image and chart limitations2930For non-PDF files, the Responses API doesn't extract embedded images or charts31into the model context.3233To preserve chart and diagram fidelity, convert the file to PDF first, then34send the PDF as `input_file`.3536## How spreadsheet augmentation works3738For spreadsheet-like files (such as `.xlsx`, `.xls`, `.csv`, `.tsv`, and39`.iif`), the Responses API uses a spreadsheet-specific augmentation process.4041Instead of passing entire sheets to the model, the API parses up to the first421,000 rows per sheet and adds model-generated summary and header metadata so the43model can work from a smaller, structured view of the data.4445## PDF detail levels4647For PDF inputs in the Responses API, set the optional `detail` field on an48`input_file` item to `auto`, `low`, or `high` to control how the API processes49page images. If omitted, `detail` defaults to `auto`. For GPT-5.6 and later50models, `auto` uses `high`; for earlier models, it uses `low`. Use `low` for fewer51input tokens, or `high` for more visual detail, such as dense charts, small print,52or diagrams.5354The `detail` setting only affects PDF page image processing. Text extracted from55the PDF is still included. Chat Completions file inputs don't support `detail`.5657A minimal Responses API request body with explicit high detail looks like this:5859```json60{61  "model": "gpt-4.1",62  "input": [63    {64      "role": "user",65      "content": [66        {67          "type": "input_file",68          "filename": "document.pdf",69          "file_data": "data:application/pdf;base64,...",70          "detail": "high"71        },72        {73          "type": "input_text",74          "text": "Summarize this document."75        }76      ]77    }78  ]79}80```8182## Accepted file types8384The following table lists common file types accepted by the Responses API as85`input_file` items. The full list of extensions and MIME types appears later on86this page. Chat Completions supports only `.pdf` (`application/pdf`) for both87`file_data` and `file_id`.8889| Category       | Common extensions                                   |90| -------------- | --------------------------------------------------- |91| PDF files      | `.pdf`                                              |92| Text and code  | `.txt`, `.md`, `.json`, `.html`, `.xml`, code files |93| Rich documents | `.doc`, `.docx`, `.rtf`, `.odt`                     |94| Presentations  | `.ppt`, `.pptx`                                     |95| Spreadsheets   | `.csv`, `.xls`, `.xlsx`                             |9697## File URLs9899100101You can provide file inputs by linking external URLs.102103Use an external file URL104105```javascript106import OpenAI from "openai";107const client = new OpenAI();108109const response = await client.responses.create({110  model: "gpt-6-astra",111  input: [112    {113      role: "user",114      content: [115        {116          type: "input_text",117          text: "Analyze the letter and provide a summary of the key points.",118        },119        {120          type: "input_file",121          file_url: "https://www.berkshirehathaway.com/letters/2024ltr.pdf",122        },123      ],124    },125  ],126});127128console.log(response.output_text);129```130131```python132from openai import OpenAI133134client = OpenAI()135136response = client.responses.create(137    model="gpt-6-astra",138    input=[139        {140            "role": "user",141            "content": [142                {143                    "type": "input_text",144                    "text": "Analyze the letter and provide a summary of the key points.",145                },146                {147                    "type": "input_file",148                    "file_url": "https://www.berkshirehathaway.com/letters/2024ltr.pdf",149                },150            ],151        },152    ],153)154155print(response.output_text)156```157158```go159package main160161import (162	"context"163	"fmt"164165	"github.com/openai/openai-go/v3"166	"github.com/openai/openai-go/v3/responses"167)168169func main() {170	client := openai.NewClient()171172	response, err := client.Responses.New(context.Background(), responses.ResponseNewParams{173		Model: "gpt-6-astra",174		Input: responses.ResponseNewParamsInputUnion{175			OfInputItemList: responses.ResponseInputParam{176				responses.ResponseInputItemParamOfMessage(177					responses.ResponseInputMessageContentListParam{178						responses.ResponseInputContentParamOfInputText(179							"Analyze the letter and provide a summary of the key points.",180						),181						{182							OfInputFile: &responses.ResponseInputFileParam{183								FileURL: openai.String(184									"https://www.berkshirehathaway.com/letters/2024ltr.pdf",185								),186							},187						},188					},189					responses.EasyInputMessageRoleUser,190				),191			},192		},193	})194	if err != nil {195		panic(err)196	}197198	fmt.Println(response.OutputText())199}200```201202```java203import com.openai.client.OpenAIClient;204import com.openai.client.okhttp.OpenAIOkHttpClient;205import com.openai.models.responses.ResponseCreateParams;206import com.openai.models.responses.ResponseInputFile;207import com.openai.models.responses.ResponseInputItem;208import java.util.List;209210ResponseCreateParams params =211    ResponseCreateParams.builder()212        .model("gpt-6-astra")213        .inputOfResponse(214            List.of(215                ResponseInputItem.ofMessage(216                    ResponseInputItem.Message.builder()217                        .role(ResponseInputItem.Message.Role.USER)218                        .addInputTextContent(219                            "Analyze the letter and provide a summary of the key points.")220                        .addContent(221                            ResponseInputFile.builder()222                                .fileUrl(223                                    "https://www.berkshirehathaway.com/letters/2024ltr.pdf")224                                .build())225                        .build())))226        .build();227228client.responses().create(params).output().stream()229    .flatMap(item -> item.message().stream())230    .flatMap(message -> message.content().stream())231    .flatMap(content -> content.outputText().stream())232    .forEach(text -> System.out.println(text.text()));233```234235```csharp236using OpenAI.Responses;237#pragma warning disable OPENAI001238239string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!;240ResponsesClient client = new(key);241242Uri fileUrl = new(243    "https://www.berkshirehathaway.com/letters/2024ltr.pdf"244);245246ResponseResult response = await client.CreateResponseAsync(247    "gpt-6-astra",248    [249        ResponseItem.CreateUserMessageItem(250            [251                ResponseContentPart.CreateInputTextPart(252                    "Analyze the letter and provide a summary of the key points."253                ),254                ResponseContentPart.CreateInputFilePart(fileUrl),255            ]256        ),257    ]258);259260Console.WriteLine(response.GetOutputText());261```262263```ruby264require "openai"265266openai = OpenAI::Client.new267268response = openai.responses.create(269  model: "gpt-6-astra",270  input: [271    {272      role: "user",273      content: [274        {275          type: "input_text",276          text: "Analyze the letter and provide a summary of the key points."277        },278        {279          type: "input_file",280          file_url: "https://www.berkshirehathaway.com/letters/2024ltr.pdf"281        }282      ]283    }284  ]285)286287puts(response.output_text)288```289290```bash291curl "https://api.openai.com/v1/responses" \292    -H "Content-Type: application/json" \293    -H "Authorization: Bearer $OPENAI_API_KEY" \294    -d '{295        "model": "gpt-6-astra",296        "input": [297            {298                "role": "user",299                "content": [300                    {301                        "type": "input_text",302                        "text": "Analyze the letter and provide a summary of the key points."303                    },304                    {305                        "type": "input_file",306                        "file_url": "https://www.berkshirehathaway.com/letters/2024ltr.pdf"307                    }308                ]309            }310        ]311    }'312```313314315316317318319## Uploading files320321The following example uploads a file with the [Files API](https://developers.openai.com/api/reference/resources/files), then references its file ID in a request to the model.322323324325Upload a file326327```javascript328import fs from "fs";329import OpenAI from "openai";330const client = new OpenAI();331332const file = await client.files.create({333  file: fs.createReadStream("fixtures/draconomicon.pdf"),334  purpose: "user_data",335});336337const response = await client.responses.create({338  model: "gpt-6-astra",339  input: [340    {341      role: "user",342      content: [343        {344          type: "input_file",345          file_id: file.id,346        },347        {348          type: "input_text",349          text: "What is the first dragon in the book?",350        },351      ],352    },353  ],354});355356console.log(response.output_text);357```358359```python360from openai import OpenAI361362client = OpenAI()363364file = client.files.create(file=open("draconomicon.pdf", "rb"), purpose="user_data")365366response = client.responses.create(367    model="gpt-6-astra",368    input=[369        {370            "role": "user",371            "content": [372                {373                    "type": "input_file",374                    "file_id": file.id,375                },376                {377                    "type": "input_text",378                    "text": "What is the first dragon in the book?",379                },380            ],381        }382    ],383)384385print(response.output_text)386```387388```go389package main390391import (392	"context"393	"fmt"394	"os"395396	"github.com/openai/openai-go/v3"397	"github.com/openai/openai-go/v3/responses"398)399400func main() {401	client := openai.NewClient()402403	file, err := os.Open("draconomicon.pdf")404	if err != nil {405		panic(err)406	}407	defer file.Close()408409	uploadedFile, err := client.Files.New(context.Background(), openai.FileNewParams{410		File:    file,411		Purpose: openai.FilePurposeUserData,412	})413	if err != nil {414		panic(err)415	}416417	response, err := client.Responses.New(context.Background(), responses.ResponseNewParams{418		Model: "gpt-6-astra",419		Input: responses.ResponseNewParamsInputUnion{420			OfInputItemList: responses.ResponseInputParam{421				responses.ResponseInputItemParamOfMessage(422					responses.ResponseInputMessageContentListParam{423						{424							OfInputFile: &responses.ResponseInputFileParam{425								FileID: openai.String(uploadedFile.ID),426							},427						},428						responses.ResponseInputContentParamOfInputText(429							"What is the first dragon in the book?",430						),431					},432					responses.EasyInputMessageRoleUser,433				),434			},435		},436	})437	if err != nil {438		panic(err)439	}440441	fmt.Println(response.OutputText())442}443```444445```java446import com.openai.client.OpenAIClient;447import com.openai.client.okhttp.OpenAIOkHttpClient;448import com.openai.models.files.FileCreateParams;449import com.openai.models.files.FilePurpose;450import com.openai.models.responses.ResponseCreateParams;451import com.openai.models.responses.ResponseInputFile;452import com.openai.models.responses.ResponseInputItem;453import java.nio.file.Path;454import java.util.List;455456var file =457    client458        .files()459        .create(460            FileCreateParams.builder()461                .file(Path.of(System.getenv("OPENAI_EXAMPLE_FILE_PATH")))462                .purpose(FilePurpose.USER_DATA)463                .build());464465var response =466    client467        .responses()468        .create(469            ResponseCreateParams.builder()470                .model("gpt-6-astra")471                .inputOfResponse(472                    List.of(473                        ResponseInputItem.ofMessage(474                            ResponseInputItem.Message.builder()475                                .role(ResponseInputItem.Message.Role.USER)476                                .addContent(477                                    ResponseInputFile.builder().fileId(file.id()).build())478                                .addInputTextContent("What is the first dragon in the book?")479                                .build())))480                .build());481response.output().stream()482    .flatMap(item -> item.message().stream())483    .flatMap(message -> message.content().stream())484    .flatMap(content -> content.outputText().stream())485    .forEach(text -> System.out.println(text.text()));486```487488```csharp489using OpenAI.Files;490using OpenAI.Responses;491#pragma warning disable OPENAI001492493string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!;494ResponsesClient client = new(key);495496OpenAIFileClient files = new(key);497498OpenAIFile file = await files.UploadFileAsync(499    "draconomicon.pdf",500    FileUploadPurpose.UserData501);502503ResponseResult response = await client.CreateResponseAsync(504    "gpt-6-astra",505    [506        ResponseItem.CreateUserMessageItem(507            [508                ResponseContentPart.CreateInputFilePart(file.Id),509                ResponseContentPart.CreateInputTextPart(510                    "What is the first dragon in the book?"511                ),512            ]513        ),514    ]515);516517Console.WriteLine(response.GetOutputText());518```519520```ruby521require "openai"522require "pathname"523524openai = OpenAI::Client.new525526file = openai.files.create(527  file: Pathname("draconomicon.pdf"),528  purpose: "user_data"529)530531response = openai.responses.create(532  model: "gpt-6-astra",533  input: [534    {535      role: "user",536      content: [537        {538          type: "input_file",539          file_id: file.id540        },541        {542          type: "input_text",543          text: "What is the first dragon in the book?"544        }545      ]546    }547  ]548)549550puts(response.output_text)551```552553```bash554curl https://api.openai.com/v1/files \555    -H "Authorization: Bearer $OPENAI_API_KEY" \556    -F purpose="user_data" \557    -F file="@draconomicon.pdf"558559curl "https://api.openai.com/v1/responses" \560    -H "Content-Type: application/json" \561    -H "Authorization: Bearer $OPENAI_API_KEY" \562    -d '{563        "model": "gpt-6-astra",564        "input": [565            {566                "role": "user",567                "content": [568                    {569                        "type": "input_file",570                        "file_id": "file-6F2ksmvXxt4VdoqmHRw6kL"571                    },572                    {573                        "type": "input_text",574                        "text": "What is the first dragon in the book?"575                    }576                ]577            }578        ]579    }'580```581582583584585586587## Base64-encoded files588589You can also send file inputs as Base64-encoded file data.590591592593Send a Base64-encoded file594595```javascript596import fs from "fs";597import OpenAI from "openai";598const client = new OpenAI();599600const data = fs.readFileSync("fixtures/draconomicon.pdf");601const base64String = data.toString("base64");602603const response = await client.responses.create({604  model: "gpt-6-astra",605  input: [606    {607      role: "user",608      content: [609        {610          type: "input_file",611          filename: "draconomicon.pdf",612          file_data: `data:application/pdf;base64,${base64String}`,613        },614        {615          type: "input_text",616          text: "What is the first dragon in the book?",617        },618      ],619    },620  ],621});622623console.log(response.output_text);624```625626```python627import base64628from openai import OpenAI629630client = OpenAI()631632with open("draconomicon.pdf", "rb") as f:633    data = f.read()634635base64_string = base64.b64encode(data).decode("utf-8")636637response = client.responses.create(638    model="gpt-6-astra",639    input=[640        {641            "role": "user",642            "content": [643                {644                    "type": "input_file",645                    "filename": "draconomicon.pdf",646                    "file_data": f"data:application/pdf;base64,{base64_string}",647                },648                {649                    "type": "input_text",650                    "text": "What is the first dragon in the book?",651                },652            ],653        },654    ],655)656657print(response.output_text)658```659660```go661package main662663import (664	"context"665	"encoding/base64"666	"fmt"667	"os"668669	"github.com/openai/openai-go/v3"670	"github.com/openai/openai-go/v3/responses"671)672673func main() {674	client := openai.NewClient()675676	data, err := os.ReadFile("draconomicon.pdf")677	if err != nil {678		panic(err)679	}680	fileData := "data:application/pdf;base64," + base64.StdEncoding.EncodeToString(data)681682	response, err := client.Responses.New(context.Background(), responses.ResponseNewParams{683		Model: "gpt-6-astra",684		Input: responses.ResponseNewParamsInputUnion{685			OfInputItemList: responses.ResponseInputParam{686				responses.ResponseInputItemParamOfMessage(687					responses.ResponseInputMessageContentListParam{688						{689							OfInputFile: &responses.ResponseInputFileParam{690								Filename: openai.String("draconomicon.pdf"),691								FileData: openai.String(fileData),692							},693						},694						responses.ResponseInputContentParamOfInputText(695							"What is the first dragon in the book?",696						),697					},698					responses.EasyInputMessageRoleUser,699				),700			},701		},702	})703	if err != nil {704		panic(err)705	}706707	fmt.Println(response.OutputText())708}709```710711```java712import com.openai.client.OpenAIClient;713import com.openai.client.okhttp.OpenAIOkHttpClient;714import com.openai.models.responses.ResponseCreateParams;715import com.openai.models.responses.ResponseInputFile;716import com.openai.models.responses.ResponseInputItem;717import java.io.IOException;718import java.nio.file.Files;719import java.nio.file.Path;720import java.util.Base64;721import java.util.List;722723String pdfData =724    Base64.getEncoder()725        .encodeToString(Files.readAllBytes(Path.of(System.getenv("OPENAI_EXAMPLE_FILE_PATH"))));726ResponseCreateParams params =727    ResponseCreateParams.builder()728        .model("gpt-6-astra")729        .inputOfResponse(730            List.of(731                ResponseInputItem.ofMessage(732                    ResponseInputItem.Message.builder()733                        .role(ResponseInputItem.Message.Role.USER)734                        .addContent(735                            ResponseInputFile.builder()736                                .filename("document.pdf")737                                .fileData("data:application/pdf;base64," + pdfData)738                                .build())739                        .addInputTextContent("Summarize this document.")740                        .build())))741        .build();742743client.responses().create(params).output().stream()744    .flatMap(item -> item.message().stream())745    .flatMap(message -> message.content().stream())746    .flatMap(content -> content.outputText().stream())747    .forEach(text -> System.out.println(text.text()));748```749750```csharp751using OpenAI.Responses;752#pragma warning disable OPENAI001753754string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!;755ResponsesClient client = new(key);756757BinaryData fileBytes = BinaryData.FromBytes(await File.ReadAllBytesAsync("draconomicon.pdf"));758ResponseResult response = await client.CreateResponseAsync(759    "gpt-6-astra",760    [761        ResponseItem.CreateUserMessageItem(762            [763                ResponseContentPart.CreateInputFilePart(764                    fileBytes,765                    "application/pdf",766                    "draconomicon.pdf"767                ),768                ResponseContentPart.CreateInputTextPart(769                    "What is the first dragon in the book?"770                ),771            ]772        ),773    ]774);775776Console.WriteLine(response.GetOutputText());777```778779```ruby780require "base64"781require "openai"782783client = OpenAI::Client.new784pdf_data = Base64.strict_encode64(File.binread("draconomicon.pdf"))785response = client.responses.create(786  model: "gpt-6-astra",787  input: [788    {789      role: :user,790      content: [791        {792          type: :input_file,793          filename: "document.pdf",794          file_data: "data:application/pdf;base64,#{pdf_data}"795        },796        {797          type: :input_text,798          text: "Summarize this document."799        }800      ]801    }802  ]803)804805puts(response.output_text)806```807808```bash809curl "https://api.openai.com/v1/responses" \810    -H "Content-Type: application/json" \811    -H "Authorization: Bearer $OPENAI_API_KEY" \812    -d '{813        "model": "gpt-6-astra",814        "input": [815            {816                "role": "user",817                "content": [818                    {819                        "type": "input_file",820                        "filename": "draconomicon.pdf",821                        "file_data": "...base64 encoded PDF bytes here..."822                    },823                    {824                        "type": "input_text",825                        "text": "What is the first dragon in the book?"826                    }827                ]828            }829        ]830    }'831```832833834835836837838## Usage considerations839840Keep these constraints in mind when you use file inputs:841842- **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).843- **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.844- **Supported models:** PDF parsing that includes text and page images requires models with vision capabilities, such as `gpt-4o` and later models.845- **File upload purpose:** You can upload files with any supported [purpose](https://developers.openai.com/api/reference/resources/files/methods/create#files-create-purpose), but use `user_data` for files you plan to pass as model inputs.846847## Full list of accepted file types848849This list applies to the Responses API. Chat Completions supports only `.pdf`850(`application/pdf`) for both `file_data` and `file_id`.851852| Category       | Extensions                                                                                                                                                                                                                                                                                                                                                 | MIME types                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |853| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |854| PDF files      | PDF files (`.pdf`)                                                                                                                                                                                                                                                                                                                                         | `application/pdf`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |855| Spreadsheets   | Excel sheets (`.xla`, `.xlb`, `.xlc`, `.xlm`, `.xls`, `.xlsx`, `.xlt`, `.xlw`)                                                                                                                                                                                                                                                                             | `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`, `application/vnd.ms-excel`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |856| 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`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |857| 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`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |858| 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`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |859| 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` |860861## Next steps862863Next, you might want to explore one of these resources:864865866867  [Experiment with file inputs in the Playground868869870871        Use the Playground to develop and iterate on prompts with file inputs.](https://platform.openai.com/chat/edit)872873874875876877  [Full API reference878879880881        Check out the API reference for more options.](https://developers.openai.com/api/reference/resources/responses)882883884885886887  [Use File Search for large corpora888889890891        Use retrieval over chunked files when you need scalable search instead of892      sending whole files in a single context window.](https://developers.openai.com/api/docs/guides/tools-file-search)893894895896897898  [Use Hosted Shell for deep spreadsheet analysis899900901902        Use Hosted Shell for advanced spreadsheet workflows such as joins,903      aggregations, and charting.](https://developers.openai.com/api/docs/guides/tools-shell#hosted-shell-quickstart)
Files main
Menu

Theme