Skip to content

File and Paste API

HyperGaming99 edited this page Jul 13, 2026 · 1 revision

File und Paste API

Datei hochladen

POST /api/file · Benutzer-API-Key erforderlich · multipart/form-data

Aliase: /api/upload-file, /api/image, /api/upload-image

curl -X POST https://0x79.one/api/file \
  -H "X-API-Key: YOUR_KEY" \
  -F "file=@./bild.png" \
  -F "domain=0x79.one" \
  -F "custom_code=my-file" \
  -F "max_clicks=10"

Die Dateifelder file, image und upload_file werden unterstützt. Erlaubte Typen und Maximalgröße werden serverseitig konfiguriert; SVG bleibt blockiert.

{
  "ok": true,
  "type": "file",
  "short_code": "my-file",
  "short_url": "https://0x79.one/my-file",
  "file": {
    "bucket": "files",
    "path": "...",
    "mime": "image/png",
    "size": 12345,
    "original_name": "bild.png"
  }
}

Paste erstellen

POST /api/paste · Benutzer-API-Key erforderlich

Alias: /api/create-paste

curl -X POST https://0x79.one/api/paste \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content":"hello paste","custom_code":"hello","max_views":4}'

Form-POST wird ebenfalls unterstützt. Inhalt kann als content, text oder paste_content gesendet werden.

{
  "ok": true,
  "type": "paste",
  "paste_code": "hello",
  "short_url": "https://0x79.one/hello",
  "raw_url": "https://0x79.one/raw/hello",
  "max_views": 4,
  "view_count": 0
}

Clone this wiki locally