How Ghost Bakery works
Ghost Bakery turns a description of your data into the data itself. A few ideas cover everything else in these docs.
Recipe, fields, records
A recipe is a YAML document. Its fields describe one record: each field has a name and a type, and produces one value per record. output.quantity says how many records to make, output.format how to write them, output.language which language names, places and text come in.
version: "1"
output: { language: por, format: json, quantity: 2 }
fields:
- { name: nome, type: text, category: fullName }
- { name: cidade, type: text, category: city }[{"cidade":"Vitória","nome":"Paulo Barbosa"},{"cidade":"Santos","nome":"Renato Xavier"}]JSON objects list their keys alphabetically, so cidade comes before nome; tabular formats keep the recipe's field order.
Recipes can be saved in your account and run again at any time, from the browser or the API.
Every run is new
Values are random. The same recipe gives the same shape every time — same fields, same rules, same format — but different values on every run. There is no seed to replay a run.
That is deliberate: tests should assert what must always hold (an e-mail has an @, end is after start, IDs are unique) rather than exact values. When a test needs fixed data, generate once and commit the file as a fixture.
Fields are independent — unless you tie them
Each field is generated on its own. A text full name and an email in the same record do not match. When values must agree, the recipe says so:
- Structured types such as
personkeep their parts consistent. - A
templateor ahashis built from earlier fields. - Relational constraints copy an earlier field or stay above or below it.
- A catalog field with
columnstakes several columns from the same country, language or currency.
Fields can only refer to fields declared before them.
Jobs
Generating is a job. When you choose Generate (or call POST /api/v1/generate), the recipe is validated, its cost is charged, and the job is queued. It then moves through:
| Status | Meaning |
|---|---|
queued |
Waiting for a worker. |
processing |
Being generated. |
completed |
Ready to download. |
failed |
Something went wrong while generating; the credits were refunded and the job carries the error. |
expired |
The result was deleted. Results are kept for a limited time only, so download them soon. |
Credits
Each job costs fields × records, plus 10%. Every field type costs the same. You always see the exact cost before paying it, and a failed job is refunded. See Credits.
Catalogs
Catalogs are curated reference data — countries, languages, currencies, continents, and word lists such as names and cities. Use them two ways:
- As fields in a recipe:
type: countrypicks a country per record, or lists them all withall: true. See Catalog types. - As direct exports from Catalogs in the app or the API, when you need the reference list itself. See Reference data.
Test bundles
A test bundle adds HTTP requests to a recipe. Instead of a data file you get a ZIP with the data, a test script for your tool (k6, Artillery, JMeter, Postman, Hurl or .http) and a README. See Build a load test.