Quickstart
In five minutes you will generate 100 customer records as CSV: first in the browser, then from a terminal with the API. You need a free account; sign up if you do not have one yet.
1. Write the recipe
A recipe says what one record looks like, how many records to make and in which format. Copy this one:
version: "1"
output:
language: eng
format: csv
quantity: 100
fields:
- { name: id, type: autoint }
- { name: first_name, type: text, category: firstName }
- { name: last_name, type: text, category: lastName }
- { name: email, type: template, template: "{{first_name}}.{{last_name}}@example.com", lowercase: true }
- { name: plan, type: enum, values: [free, pro, team], weights: { free: 6, pro: 3, team: 1 } }
- { name: signed_up, type: date, range: past }Read it top to bottom:
outputasks for 100 records, in English, as CSV.idcounts 1, 2, 3, …first_nameandlast_nameare drawn from English name lists.emailis built from the two names of the same record, then lowercased — so it matches them.planpicksfreesix times as often asteam.signed_upis a date within the last ten years.
2. Generate it in the browser
- Open Recipes and choose New recipe.
- Give it a name, open the YAML tab and paste the recipe. The Visual tab shows the same recipe as a form; edits in either tab update the other.
- Open Preview to see one sample record. Regenerate draws another.
- Choose Estimate cost. This recipe has 6 fields × 100 records = 600 credits, plus 10%: 660 credits. Nothing is charged yet.
- Choose Generate. The job runs in the background; when it is done, a Download button appears. Recent jobs and their downloads are also on your dashboard.
id,first_name,last_name,email,plan,signed_up
1,George,Perry,george.perry@example.com,free,2022-02-23
2,Chloe,Bell,chloe.bell@example.com,pro,2017-07-14
3,Ashley,Cook,ashley.cook@example.com,free,2025-10-28
…Your values will differ: every run draws new ones. Change format: csv to json or xlsx and generate again — the recipe stays the same.
3. Do the same with the API
Automation uses an API key. In Account → API keys, create a key with the scopes generate and jobs:read, and copy it — it is shown only once.
export GB_KEY="grd_…" # your key
API=https://api.ghostbakery.com
# Check the cost. Nothing is charged.
curl -s "$API/api/v1/estimate" \
-H "Authorization: Bearer $GB_KEY" \
-H "Content-Type: application/x-yaml" \
--data-binary @customers.yaml
# {"$schema":"…","cost":660,"balance":…,"quantity":100,"fields":6}
# Charge and queue the job.
JOB=$(curl -s "$API/api/v1/generate" \
-H "Authorization: Bearer $GB_KEY" \
-H "Content-Type: application/x-yaml" \
--data-binary @customers.yaml | jq -r .job_id)
# Wait for it.
while :; do
STATUS=$(curl -s "$API/api/v1/jobs/$JOB" -H "Authorization: Bearer $GB_KEY" | jq -r .status)
[ "$STATUS" = completed ] && break
[ "$STATUS" = failed ] && { echo "job failed"; exit 1; }
sleep 1
done
# Download ghostbakery-output.csv.
curl -s -OJ "$API/api/v1/jobs/$JOB/download" -H "Authorization: Bearer $GB_KEY"Next steps
- Understand the moving parts in How Ghost Bakery works.
- Browse all field types for what else a field can be.
- Follow a guide: related values, nested JSON, a k6 load test or CI automation.