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.
What is simulated
Section titled “What is simulated”POST /v1/quotesanswers a quote withmax_cost: 0.POST /v1/generationsanswers a generation that isqueuedfor about a second,processingfor about four, thencompletedwith a sample file of the model’s output type (image, video or audio).costis always 0.GET /v1/generations,GET /v1/generations/{id}andPOST /v1/generations/{id}/cancelread and cancel test generations only.Prefer: wait=Nworks as it does live.- Requests are validated exactly as live ones: the model, its
input_schema,max_cost,Idempotency-Keyandquoterules 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.
Forcing an outcome
Section titled “Forcing an outcome”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 |
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]" } }'What is real
Section titled “What is real”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.