▼
Alles, was die Formulare dieser Seite tun, für Skripte. Jede Antwort ist JSON, auch Fehler, damit du nie raten musst, ob ein Rumpf ein Ergebnis oder eine Erklärung ist.
Sende POST an den Endpunkt, entweder mit Formularparametern oder mit einem JSON-Rumpf. Beides ist gleichwertig; nimm, was dein Werkzeug leichter macht. Der Parameter action wählt die Aktion. Nutze --data-urlencode für alles, was jemand eingetippt hat — Paste-Text, eine URL, eine Übersetzung — denn -d sendet den Wert roh und er wird beim ersten & abgeschnitten. Einfaches -d genügt für feste Werte wie action selbst.
curl -X POST https://0wx.org/api.cgi \
-d action=paste --data-urlencode 'content=hello & world'
curl -X POST https://0wx.org/api.cgi \
-H 'Content-Type: application/json' \
-d '{"action":"paste","content":"hello & world"}'
wget -qO- --header='Content-Type: application/json' \
--post-data '{"action":"paste","content":"hello & world"}' https://0wx.org/api.cgi
In einem Formularrumpf trennt & Parameter, und curl -d kodiert nicht, was du übergibst. Eine URL mit Query-String wird deshalb beim ersten & abgeschnitten, der Rest kommt als eigene Parameter an. Nimm --data-urlencode oder sende JSON. Überzählige Parameter werden abgelehnt statt ignoriert, das schlägt also laut fehl, statt einen halben Link zu speichern.
# wrong -- the value is cut at the &
curl -X POST https://0wx.org/api.cgi \
-d action=tinyurl -d 'url=https://example.com/?a=1&b=2'
# right
curl -X POST https://0wx.org/api.cgi \
-d action=tinyurl --data-urlencode 'url=https://example.com/?a=1&b=2'
# also right -- JSON needs no escaping
curl -X POST https://0wx.org/api.cgi -H 'Content-Type: application/json' \
-d '{"action":"tinyurl","url":"https://example.com/?a=1&b=2"}'
# wget has no --data-urlencode, so percent-encode it yourself...
wget -qO- --post-data 'action=tinyurl&url=https%3A%2F%2Fexample.com%2F%3Fa%3D1%26b%3D2' https://0wx.org/api.cgi
# ...or send JSON, which needs no encoding at all
wget -qO- --header='Content-Type: application/json' \
--post-data '{"action":"tinyurl","url":"https://example.com/?a=1&b=2"}' https://0wx.org/api.cgi
Optional. Ohne Schlüssel ist eine Anfrage anonym und verhält sich genau wie ein anonymer Besuch — das Ergebnis ist so oder so öffentlich, der Unterschied ist nur, ob es in deiner Dateiliste landet. Erzeuge einen Schlüssel auf deiner Kontoseite und sende ihn als Bearer-Token; als Parameter apikey geht auch, aber ein Schlüssel in der Adresse landet in Serverprotokollen und im Browserverlauf.
curl -X POST https://0wx.org/api.cgi \
-H 'Authorization: Bearer YOUR_KEY' \
-d action=whoami
wget -qO- --header='Authorization: Bearer YOUR_KEY' \
--post-data 'action=whoami' https://0wx.org/api.cgi
| action | Parameter | Beschreibung |
|---|---|---|
whoami | — | Prüft, ob ein Schlüssel funktioniert, und nennt die aktuellen Grenzen. Kostet nichts; ruf das zuerst auf. |
ip | — | Reports your address, its PTR, the country, state and city it geolocates to, the coordinates, and the user agent you sent. Needs no key and answers the same with or without one. Deliberately narrower than the web page: no WHOIS, no DNS zone and no blocklist lookups, so calling it costs the server nothing but a local database read. |
upload | file (wiederholbar), resize, lifetime, gallery or g ☉ | Lädt eine oder mehrere Dateien hoch. Muss multipart/form-data sein. |
tinyurl | url, lifetime | Kürzt eine URL. |
hugeurl | url, lifetime | Verlängert eine URL, absurd, mit Absicht. |
paste | content, lifetime | Speichert einen Textblock und gibt einen Link darauf zurück. |
translate | content, to | Übersetzt Text. to ist ein ISO-639-Code — das sind nicht immer Ländercodes: Dänisch ist da, nicht dk. |
listfiles ☉ | page, g | Lists your files with everything the Info panel shows, plus the thumbnail and direct link. g limits it to one gallery, or none for files in no gallery. |
listpastes ☉ | page | Lists your pastes, with a 200-character preview of each rather than the whole body. |
listurls ☉ | page | Lists your short and huge URLs, with the address each one points at. |
otl ☉ | share | Creates a one-time link to one of your files. Each call mints a new one, so handing the same file to two people gives two links. |
listotl ☉ | page | Lists your active one-time links, the file each points at, and whether that file has since expired. |
listgalleries ☉ | — | Lists your galleries with their ids, names, file counts and publishing state. |
gallery ☉ | g, publish | Reports a gallery's publishing state, and changes it when publish is given. |
move ☉ | share (wiederholbar), gallery or g | Moves files into a gallery, by name (created if new) or by id. Both omitted moves them back to the main listing. |
delete ☉ | share (wiederholbar), g, otl, withfiles | Deletes files, pastes, short URLs, galleries, one-time links, or any mix. A share is matched against your files first and then against your pastes and links, so the caller does not have to sort them by type. One-time links go in otl, separately: removing a link must not be confusable with deleting the file it points at. |
☉ These actions need an API key. They read or change one account's own data, so there is no anonymous form of them.
share and g accept a repeated field, a JSON array, or a comma-separated list — whichever your tooling makes easiest. Duplicates are ignored.
curl -X POST https://0wx.org/api.cgi -H 'Authorization: Bearer YOUR_KEY' \
-d action=move -d share=Ab3xK9pQ -d share=Zz7yT2mN --data-urlencode 'gallery=Holiday 2026'
curl -X POST https://0wx.org/api.cgi -H 'Authorization: Bearer YOUR_KEY' \
-d action=delete -d 'share=Ab3xK9pQ,Zz7yT2mN'
curl -X POST https://0wx.org/api.cgi -H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_KEY' \
-d '{"action":"move","share":["Ab3xK9pQ","Zz7yT2mN"],"g":7}'
wget -qO- --header='Authorization: Bearer YOUR_KEY' \
--post-data 'action=delete&share=Ab3xK9pQ,Zz7yT2mN' https://0wx.org/api.cgi
Wherever a gallery is named — on upload or on move — it is given the same two ways: g for an existing id, or gallery for a name, which is created if it is new. If both are sent, g wins. The reply carries the gallery id. Note that deleting a gallery removes only the gallery, leaving its files in the main listing — unlike the web form, which deletes them after asking. Pass withfiles=true to delete them as well: a script tidying up its groupings should not lose the uploads by accident.
curl -X POST https://0wx.org/api.cgi -H 'Authorization: Bearer YOUR_KEY' \
-F action=upload -F file=@photo.jpg --form-string 'gallery=Holiday 2026'
curl -X POST https://0wx.org/api.cgi -H 'Authorization: Bearer YOUR_KEY' \
-d action=gallery -d g=7 -d publish=true
wget -qO- --header='Authorization: Bearer YOUR_KEY' \
--post-data 'action=gallery&g=7&publish=true' https://0wx.org/api.cgi
Uploads können den JSON-Rumpf nicht nutzen, weil eine Datei als multipart gesendet werden muss. Wiederhole den Teil file, um mehrere auf einmal zu senden. Jede Datei wird einzeln gemeldet: die Antwort enthält eine Liste files mit den angenommenen und eine Liste rejected mit den abgelehnten, ein Teilerfolg bleibt also ein Erfolg.
curl -X POST https://0wx.org/api.cgi \
-H 'Authorization: Bearer YOUR_KEY' \
-F action=upload \
-F file=@photo.jpg \
-F file=@notes.txt \
-F lifetime=7d
There is no wget form of this one. wget cannot build a multipart/form-data body — it has no equivalent of curl's -F — and uploads must be multipart. Use curl, or assemble the body and boundary yourself and send it with --post-file.
Optional bei jeder Aktion, die etwas speichert. Akzeptiert reine Sekunden oder eine Zahl gefolgt von m, h oder d — dieselben Formen wie die Webformulare. Lass es weg oder gib 0 an, um den Eintrag unbegrenzt zu behalten.
Jede Antwort ist ein JSON-Objekt mit einem Feld ok. Bei Erfolg trägt es das Ergebnis, bei Fehlschlag einen festen Code error und eine lesbare message. Verzweige über den Code, protokolliere die Meldung.
{"ok":true,"type":"paste","share":"Ab3xK9pQ",
"url":"https://0wx.org/p/Ab3xK9pQ","bytes":11}
{"ok":false,"error":"url_too_long",
"message":"URL exceeds the maximum length."}
| error | HTTP | Beschreibung |
|---|---|---|
unknown_action | 400 | Diese Aktion gibt es nicht. |
bad_json | 400 | Der Rumpf war kein gültiges JSON, oder ein Feld enthielt eine verschachtelte Struktur. |
unexpected_parameter | 400 | Es kam ein Parameter an, den diese Aktion nicht kennt — meist ein unkodiertes & in einem Wert. Die Meldung nennt die Parameter. |
bad_key | 401 | Der Schlüssel wurde nicht erkannt. Ein falscher Schlüssel wird abgelehnt und nicht stillschweigend als anonym behandelt. |
bad_url | 400 | Die URL ist fehlerhaft oder nutzt ein anderes Schema als http(s), ftp oder gopher. |
bad_lifetime | 400 | Die Speicherdauer war keine Zahl und keine Zahl gefolgt von m, h oder d. |
no_content | 400 | Es wurde nichts zum Speichern gesendet. |
url_too_long | 413 | Die URL ist länger als erlaubt. |
paste_too_long | 413 | Der Text ist größer als das Paste-Limit. Grenzen zählen Bytes in UTF-8, nicht-lateinischer Text zählt also mehr, als die Zeichenzahl vermuten lässt. |
too_many_files | 413 | Mehr Dateien, als ein Aufruf annimmt. |
no_usable_files | 415 | Alle Dateien wurden abgelehnt. Der Grund steht in der Liste rejected. |
backend_unavailable | 502 | Der Übersetzungsdienst hat nicht geantwortet. |
internal | 500 | Etwas ist unerwartet fehlgeschlagen. Es wurde protokolliert. |
Ruf whoami auf, statt die Werte fest einzubauen — sie werden vom Betreiber gesetzt und können sich ändern. Größen sind Bytes in UTF-8.
0wx.sh wraps all of the above. It is plain POSIX shell and needs nothing but curl, and it is short enough to read before you run it — which is the right thing to do with a script that will hold your API key. Put the key in OWX_KEY rather than passing --key, and it stays out of your shell history.
wget https://0wx.org/clients/0wx.sh chmod +x 0wx.sh export OWX_KEY=YOUR_KEY ./0wx.sh help ./0wx.sh paste --content 'hello & world'
0wx.py does the same as the shell client, but parses the reply and prints what the fields mean rather than handing you raw JSON — add --json when you want the raw form back. Standard library only: no requests, nothing to install. If you are writing your own client, its send() and report() functions are the parts worth reading: between them they show how to build the request, how to get the message out of a failed one, and what the replies contain.
wget https://0wx.org/clients/0wx.py chmod +x 0wx.py export OWX_KEY=YOUR_KEY ./0wx.py listfiles ./0wx.py listfiles --json | jq '.files[].url'
0wx.pl does the same as the Python one and prints the same output. Core modules only — HTTP::Tiny and JSON::PP have shipped with Perl since 5.14, so there is nothing to install. Worth reading next to the Python client if you are writing your own: the two languages fail differently on a broken request, and both scripts say where.
wget https://0wx.org/clients/0wx.pl chmod +x 0wx.pl export OWX_KEY=YOUR_KEY ./0wx.pl listfiles
0wx.ps1 is the Python client's counterpart for Windows: same commands, same output, and it parses the reply rather than handing you raw JSON — add --json for that. It is written for the Windows PowerShell that is already on the machine, so there is nothing to install, and it runs unchanged on PowerShell 7. You may need Set-ExecutionPolicy -Scope Process Bypass in the window you run it from, which is Windows asking whether you meant to run a script you downloaded — a fair question, and the file is short enough to read first.
$env:OWX_KEY = 'YOUR_KEY' .\0wx.ps1 listfiles .\0wx.ps1 paste --content 'hello & world' .\0wx.ps1 upload --file .\holiday.jpg --gallery 'Holiday 2026'
0wx-gtk.pl is a small GTK window with tabs for uploading, pasting, shortening, and browsing your files — as a list or as a gallery of thumbnails, filtered by gallery. It is the one client here with a dependency: the Perl GTK3 bindings, which a graphical program cannot avoid. Everything else it uses ships with Perl. The key is held in memory only: closing the window forgets it, and setting OWX_KEY fills it in at startup. Whatever it shows you, the server's raw reply is one click away under “Server reply”.
apt install libgtk3-perl # or: dnf install perl-Gtk3 wget https://0wx.org/clients/0wx-gtk.pl chmod +x 0wx-gtk.pl OWX_KEY=YOUR_KEY ./0wx-gtk.pl
0wx-android.apk does what the other clients do, from a phone: uploading, pasting, shortening, translating, and browsing your files as a list or a gallery. Sharing a file to it from any other app uploads it, and sharing text stores it as a paste. It is not on any app store, so your device will ask you to allow installing it — which is a question worth taking seriously in general, and the reason the whole source is also here: open it in Android Studio and build it yourself rather than trusting the file. Building needs JDK 21; BUILDING.md inside says why.
https://0wx.org/clients/0wx-android.apk # install it https://0wx.org/clients/0wx-android.zip # build it yourself
Es gibt bewusst keine Aktion zum Abholen entfernter Dateien. Sie würde den Server eine URL nach Wahl des Aufrufers holen lassen, was eine Angriffsfläche für Request Forgery ist, und ein Skript kann das weit härter treiben als ein Formular. Lade die Datei stattdessen selbst hoch.