Chatkit invalid upload file types

I’m embedding Chatkit into one of my projects. After managing to get the chat working, enabling file uploads at session creation and in the Chatkit config I’m getting bad request errors when uploading XLSX and CSVs.

Other users reported the same issue at the bottom of this thread: How to enable File Uploads in Chatkit?
I’m reopening here because that one started with a different question and it’s now marked as solved.

For context my backend session creation code is the following

const chatSession = await this.openai.beta.chatkit.sessions.create({
  user: user.id,
  chatkit_configuration: { file_upload: { enabled: true } },
  workflow: {
    id: chatkitConfig.workflowId,
    version: chatkitConfig.workflowVersion,
    state_variables: {
      user_id: user.id,
      user_name: user.name,
      user_role: user.role,
    },
  },
});

Chatkit config

chatkit.setOptions({
  api: {
    getClientSecret: async (currentClientSecret: string | null) => {
      const session = await this.assistantService.getAssistantSession(currentClientSecret === null);
      return session.client_secret;
    },
  },
  locale: 'es',
  theme: 'dark',
  composer: {
    attachments: {
      enabled: true,
    },
  },
});

Upload error when loading a CSV file (Browser console)

{
    "message": "Uploaded file type is not allowed for this session.",
    "type": "invalid_request_error",
    "param": null,
    "code": "chatkit.file_upload_type_rejected"
}

Capture of the error (UI)

The version of the backend OpenAI API Node library is 6.7.0 (latest as of now).

I’m using the webcomponent version for the frontend since I’m embedding this into an Angular project.

The same CSV file can be added to the demo ChatKit Studio as well as the agent builder Preview with no issues.

I would appreciate any feedback on this if because this is a really cool product and I would love to get it working. Thanks.

2 Likes

Hi all, I’m running into a similar issue as described above. Looks like the upload fails when I try to upload .csv, .xlsx and even .txt file format. PDFs work fine.

Can someone please post an overview of the supported file formats for the chatkit/agent builder file upload?

Appreciate the help!

1 Like

I’m also having this problem. I can only upload PDFs and images. Is there any other setting I need to change?

Hey all, thanks for laying everything out clearly.

Since uploads are enabled and other file types (like PDFs/images) work, but .csv / .xlsx are being rejected with chatkit.file_upload_type_rejected, this is likely happening at the ChatKit upload layer before your workflow runs.

Before we escalate this internally, we’ll need a bit more concrete evidence so engineering can investigate properly. Could you share the request ID from one of the failed /v1/chatkit/files calls, along with the exact MIME type being sent (you can check the Content-Type header in the network tab)? Also, let us know whether you're using the OpenAI-hosted ChatKit endpoint or running your own server, and roughly when (including timezone) the failure occurred.

Once we have that, we can package this properly for escalation.

1 Like

Hey OpenAI team – thanks for getting back to this.

I tested the csv and excel upload in the agent builder preview on platform.openai.com and that works fine. But the custom implementation in my app still seems to fail.

See below the diagnostic info you asked for.
Hope this helps with the investigation! Looking forward to hearing back.

Request ID: 0476b9e8-1937-415c-b5de-e466c03f58c2

MIME type sent: text/csv (checked the Payload tab to confirm)

Deployment: OpenAI-hosted — the request goes to api.openai.com, served from cdn.platform.openai.com (Hosted Mode via client_secret)

Timestamp: Wed, 04 Mar 2026 16:07:58 GMT

Additionally I can also provide the organization and project_id if that’s helpful.

Cheers