Skip to content
Book a callStart free

Build with test keys

A test key does everything a live key does except spend. Prices are real, results are placeholders, nothing is charged.

View as Markdown

  • Starts with dfsr_test_. A live key starts with dfsr_live_.
  • Quotes the exact price, the same as a live key. Dry runs are identical.
  • Holds and charges nothing. No model runs.
  • Returns a placeholder file a few seconds later. Results say "test": true.
  • Has its own results, callback log and callback signing secret. A test key never sees live results and a live key never sees test results (a wrong-mode id answers NOT_FOUND).
curl -X POST https://app.diffusr.ai/api/v2/make_image \
-H "Authorization: Bearer $DIFFUSR_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"prompt": "A can of sparkling water on a wet street, soft morning light",
"aspect_ratio": "1:1"
}'
  • Use ads routes, or video templates (run_template with a video template). These answer TEST_MODE_UNSUPPORTED (403).
  • Run more than a fixed number of test runs a day: see Limits (TEST_LIMIT).

A test key can upload files. Test uploads are kept for a shorter time: see Uploads and media.

Change nothing but the key. Run a dry run, show the price to the person, and start with a live key.