Skip to content
Docs menu
Guides

Sandbox

Test your integration with a sandbox key. Real conversions that use neither credits nor the free quota.

A sandbox key starts with sf_test_. It works like a live key, with one difference: conversions never use credits and do not count toward your free daily quota. Use it for development and automated tests.

Get a sandbox key#

In the dashboard under API keys, create a key and choose Sandbox. Use it like any other key:

Shell
curl "https://api.switchfile.io/v1/convert?wait=30" \
  -H "Authorization: Bearer $SWITCHFILE_API_KEY" \
  -F [email protected] -F to=webp

What is the same#

  • Conversions really run and return real files, so you can check the results.
  • All endpoints, error codes, webhooks and idempotency work the same way.
  • Rate limits and file sizes are the same.
  • Results are kept for 24 hours, like with a live key.

What is different#

  • No credits are used, and the free daily quota stays untouched.
  • A dry run shows the credits and price of a live key, with "free": true.

Switch to a live key (sf_live_) when you go to production. Nothing else in your code needs to change.