Zum Inhalt springen
DeutschlandGPT

Upload file to Custom GPT

Uploads and links a file to a Custom GPT. Max 50 MB. 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. A Custom GPT holds at most 10 images; uploading another image returns 409.

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

409

The Custom GPT already holds the maximum of 10 images

Error
Was this page helpful?
Upload file to Custom GPT · DeutschlandGPT