Zum Inhalt springen
DeutschlandGPT

Upload file to Custom GPT

Uploads and links a file to a Custom GPT. Max 50 MB (25 MB for audio). Only common document, image, audio, video, text, and archive types are accepted and validated against their declared type (magic bytes); disallowed or mismatched files return 400.

POSThttps://api.deutschlandgpt.de/v2/custom-gpts/{id}/files

Example request

curl https://api.deutschlandgpt.de/v2/custom-gpts/{id}/files \
  -X POST \
  -H "Authorization: Bearer $DGPT_API_KEY"

Parameters

idstring<uuid>required

Custom GPT ID

Response

201application/json
{
  "file_id": "string"
}

File uploaded and linked

file_idstring

Response codes

201

File uploaded and linked

object
400

Invalid file type or size

401

Unauthorized

402

Insufficient credits or spending limit exceeded

Error
404

Custom GPT not found or access denied

Was this page helpful?