For AI agents: this page is also available as Markdown at https://docs.refabric.com/api-reference/platform/tasks/read-prices.md, and the index of every page is https://docs.refabric.com/llms.txt.
Platform API › Tasks
Read prices
Every task's prices, per option, read live from the price list — the same figures POST /v1/tasks/{name}/estimate answers for each option.
https://api.refabric.com/v1/pricingimport os
import requests
url = "https://api.refabric.com/v1/pricing"
headers = {"Authorization": f"Key {os.environ['REFABRIC_API_KEY']}"}
response = requests.get(url, headers=headers)
print(response.json()){
"items": []
}Filters and sorting
taskanswers one task only.
Authentication. Any key: the price list is the same for every key of your account.
Key features
- Read live: a price change shows here at once.
Common use cases
- Show what each option costs before anyone runs a task.
Example values. Read live from GET /v1/pricing.
See also
POST /v1/tasks/{name}/estimateGET /v1/account/usage
Authorization
Authorization: Key $REFABRIC_API_KEY
Parameters
Query parameters
- stringoptionalDefault:
Only this task (
image.generate).
Header parameters
- stringoptional
The contract version you wrote against (a date). Absent: the current version.
format: date
- stringoptional
Your own id for this request; we answer it back under X-Client-Request-ID.
max length 128
Response
200 — Done: the answer is in the body.
- array<object>required
One entry per task, by name.
- stringrequired
The task.
Example:
image.generate - array<string>optionalnullable
The credit types its prices are in.
Values
refabric_credits— Spent by tasks.model_credits— Credits for model training.
Example:
["refabric_credits"] - array<object>optionalnullable
One row per combination of the options that change the price.
- objectrequired
The options, by field name, this price is for.
Example:
{"resolution":"4k"} - integerrequired
The credits this combination costs. Read it live:
GET /v1/pricing. - stringrequirednullable
Which kind of credit an amount is counted in.
Values
refabric_credits— Spent by tasks.model_credits— Credits for model training.
Example:
refabric_credits
- array<string>optionalnullable
The options that do not change the price.
Example:
["aspect_ratio"] - stringoptionalnullable
The count or list the price is a multiple of: a row is the price of one.
Example:
image_count - objectoptionalnullable
By list field: the price at every length it takes, in runs of equal price.
- stringoptionalnullable
How the price depends on what you send, when it does.
Example:
The price depends on how many photos the shoot plans. - objectoptionalnullable
With
ruleorsizes: the example the price was measured on.- objectrequired
The example's request body.
Example:
{"prompt":"A linen dress"} - integerrequired
The credits the example costs. Read it live:
GET /v1/pricing. - stringrequirednullable
Which kind of credit an amount is counted in.
Values
refabric_credits— Spent by tasks.model_credits— Credits for model training.
Example:
refabric_credits
- 400 — The request cannot be read as it was sent (a header, the URL or the body's form).
- 401 — No valid API key was sent.
- 403 — Your key or your plan does not allow this.
- 422 — A field is missing or has a value this operation cannot use.
- 429 — Too many requests: wait for the number of seconds in the Retry-After header.
- 500 — Something went wrong on our side; retry, and quote the request id if it keeps happening.