cURL · API

Image hosting API cURL, one-liner style.

Upload from your shell, bash scripts, GitHub Actions, or anywhere cURL runs. Pipe with jq to extract the URL in one line.

cURL
# Anonymous upload (rate-limited, no auth required)
curl -X POST https://imagetourl.cloud/api/upload \
  -F "file=@screenshot.png"

# Authenticated upload (Pro / Business)
curl -X POST https://imagetourl.cloud/api/upload \
  -H "Authorization: Bearer $IMAGETOURL_KEY" \
  -F "file=@screenshot.png"

# Extract the URL from the JSON response with jq
curl -sS -X POST https://imagetourl.cloud/api/upload \
  -H "Authorization: Bearer $IMAGETOURL_KEY" \
  -F "file=@screenshot.png" \
  | jq -r '.data.url'

# Delete an upload
curl -X DELETE https://imagetourl.cloud/api/uploads/abc123 \
  -H "Authorization: Bearer $IMAGETOURL_KEY"

Why use ImageToURL's API

Terminal-native

No language runtime needed. Runs on macOS, Linux, WSL, and CI environments out of the box.

GitHub Actions friendly

Upload screenshots from your test runs, CI-generated reports, or build artifacts as one step in any workflow.

Bash pipelines

Chain with find, xargs, jq, and other Unix tools — bulk upload every PNG in a directory in one line.

Debugging aid

When your language client behaves oddly, curl -v reproduces the raw HTTP exchange. Fastest way to verify API behavior.

FAQ

Why -F instead of --data-binary?

-F tells curl to use multipart/form-data, which is what the API expects. --data-binary sends the raw bytes without form encoding — wrong format.

Can I pipe an image from stdin?

Yes: cat img.png | curl -X POST -F 'file=@-;filename=img.png;type=image/png' .... Useful for one-shot pipelines.

GitHub Actions example?

steps: - run: | URL=$(curl -sS -X POST https://imagetourl.cloud/api/upload -H "Authorization: Bearer $KEY" -F "file=@./screenshot.png" | jq -r '.data.url') && echo "$URL"

Bulk upload a directory?

find . -name '*.png' -exec curl -X POST https://imagetourl.cloud/api/upload -H "Authorization: Bearer $KEY" -F 'file=@{}' \;. Add jq to collect URLs.

Progress bar for large uploads?

Remove -sS to see the default progress meter. -v for full request/response logging.

Setting a timeout?

--max-time 30 caps total duration; --connect-timeout 10 caps the TCP handshake.

Why does auth header get logged?

-v logs everything including the Authorization header. Use -v 2> err.log and scrub before sharing logs.

Can I pass the key in a file?

-H "Authorization: Bearer $(cat ~/.imagetourl)" — keeps the key out of shell history and process lists.