Skip to content

Test keys

A test key starts with hl_test_. Create one in Account → Developers by choosing Test key. It works like a live key with one difference: quotes and generations are simulated. Nothing is sent to a model host and nothing is charged.

  • POST /v1/quotes answers a quote with max_cost: 0.
  • POST /v1/generations answers a generation that is queued for about a second, processing for about four, then completed with a sample file of the model’s output type (image, video or audio). cost is always 0.
  • GET /v1/generations, GET /v1/generations/{id} and POST /v1/generations/{id}/cancel read and cancel test generations only. Prefer: wait=N works as it does live.
  • Requests are validated exactly as live ones: the model, its input_schema, max_cost, Idempotency-Key and quote rules are the same, so a request that works with a test key works with a live key.

Test generations do not send webhooks and do not appear in GET /v1/events. Their sample outputs are not assets, so they cannot be used as inputs.

Put one of these markers anywhere in a string input (usually the prompt), or set the metadata key test_outcome:

Marker metadata.test_outcome Result
[fail] fail failed with generation_failed
[blocked] blocked failed with content_blocked
[slow] slow processing for about a minute, then completed
Terminal window
curl https://api.halationlab.ai/v1/generations \
-H "Authorization: Bearer $HALATIONLAB_TEST_KEY" \
-H "Content-Type: application/json" \
-H "Prefer: wait=10" \
-d '{ "model": "seedance-2.5", "input": { "prompt": "A red fox [fail]" } }'

Everything else acts on your real account: projects, assets, uploads, imports, the account endpoint and webhook endpoints. A test key never spends tokens, so it has no spending limit; it can still upload files, which count towards your storage.