Skip to content

Pricing and quotes

Every amount is a whole number of tokens, the unit the app shows.

  • Every paid request is quoted before it starts. The quoted maximum is reserved before dispatch and re-checked at start.
  • You are never charged more than cost.quoted_max. What was charged is cost.charged, final once cost.final is true.
  • Failed work is free. Work cancelled before it was sent to a model host is free and its tokens are released. A late result is delivered free.
  • Every refusal (an error response) is free.

The billing outcomes page lists every case.

GET /v1/models/{model} returns price, for display:

Field Meaning
unit What one unit is: second of output, one output, a character or thousand_characters of text.
from_per_unit The lowest price per unit over the settings in varies_by.
varies_by Parameters that change the price, for example resolution.
typical A typical request, its quantity and its price.
discount_percent An active model discount already applied to the figures, or null.

price is null when a model cannot be priced right now. A published price is not binding; a quote is.

POST /v1/generations quotes and starts in one step. Send max_cost, the most you will pay. If the quoted maximum is higher, nothing is created or charged, and the answer is 402 max_cost_exceeded with the quote in error.details.quote. Without max_cost, the spending limit is the only ceiling.

POST /v1/quotes takes the same model, input, project and use_brief as a generation, and returns a binding quote. Nothing runs and nothing is charged.

quote.sh
# Prices a request without starting it. Quotes are free and valid for 30 minutes.
set -euo pipefail
API="${HL_API_BASE:-https://api.halationlab.ai/v1}"
curl -sS --fail-with-body "$API/quotes" \
-H "Authorization: Bearer $HALATIONLAB_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2.5",
"input": { "prompt": "A red fox running through snow", "duration": 5, "resolution": "1080p" }
}'
Field Meaning
max_cost The binding maximum price.
list_cost The price before a model discount, when one applies.
unit, quantity The billing unit and how many units are priced.
processor The company that will run the model, named because your content is sent to it.
input The parameters priced, defaults included.
expires_at 30 minutes after the quote was made.

Start it with POST /v1/generations and {"quote": "quote_…"}. A quote starts at most once:

start-from-quote.sh
# Gets a quote, shows the price, then starts exactly that request from the quote. Needs jq.
# Refuses to start if the quoted maximum is above MAX_COST (default 100 tokens).
set -euo pipefail
API="${HL_API_BASE:-https://api.halationlab.ai/v1}"
MAX_COST="${MAX_COST:-100}"
quote=$(curl -sS --fail-with-body "$API/quotes" \
-H "Authorization: Bearer $HALATIONLAB_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "model": "flux.2-pro", "input": { "prompt": "A red ceramic mug on a linen tablecloth" } }')
price=$(jq -r .max_cost <<<"$quote")
echo "Quoted maximum: $price tokens (processor: $(jq -r .processor <<<"$quote"), expires $(jq -r .expires_at <<<"$quote"))"
if (( price > MAX_COST )); then echo "Above MAX_COST ($MAX_COST); not starting."; exit 0; fi
curl -sS --fail-with-body "$API/generations" \
-H "Authorization: Bearer $HALATIONLAB_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Prefer: wait=60" \
-H "Content-Type: application/json" \
-d "{ \"quote\": \"$(jq -r .id <<<"$quote")\" }"
Error When
409 quote_expired The quote is more than 30 minutes old.
409 quote_used The quote already started a generation.
409 price_changed The model’s price, host or terms changed since the quote. Nothing was charged; get a new quote.

Quotes count towards the rate limit of 15 paid starts or quotes a minute.