Zum Inhalt springen
DeutschlandGPT

Upload file to folder

Uploads a file to a document folder. 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 files return 400. Indexing for semantic search runs asynchronously, so a newly uploaded file may take a moment to become searchable.

POSThttps://api.deutschlandgpt.de/v2/document-folders/{id}/files

Example request

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

Parameters

idstring<uuid>required

Document folder ID

Response

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

File uploaded

file_idstring

Response codes

201

File uploaded

object
400

Invalid file type or size

401

Unauthorized

402

Insufficient credits or spending limit exceeded

Error
403

Requires enterprise workspace

404

Folder not found or access denied

Was this page helpful?