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:

customers.yaml
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:

  • output asks for 100 records, in English, as CSV.
  • id counts 1, 2, 3, …
  • first_name and last_name are drawn from English name lists.
  • email is built from the two names of the same record, then lowercased — so it matches them.
  • plan picks free six times as often as team.
  • signed_up is a date within the last ten years.

2. Generate it in the browser

  1. Open Recipes and choose New recipe.
  2. 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.
  3. Open Preview to see one sample record. Regenerate draws another.
  4. Choose Estimate cost. This recipe has 6 fields × 100 records = 600 credits, plus 10%: 660 credits. Nothing is charged yet.
  5. 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.
ghostbakery-output.csv
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.

terminal
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