JavaScript Example

Uploads a file to owf.gay in one request via POST /a/1/u/s, using JavaScript's standard HTTP client - no third-party library required.

import { readFile } from "fs/promises";

const url = "https://owf.gay/a/1/u/s";
const headers = {}; // add { "X-Api-Key": "your-api-key" } if accounts are enabled

const form = new FormData();
form.append("f", new Blob([await readFile("file.txt")]), "file.txt");

const res = await fetch(url, { method: "POST", headers, body: form });
console.log(await res.text()); // the file's URL

Full endpoint details are on the API page.