Getting started
Generate your first image with the API
Generate an image with curl by adding an image node to a Hypermake space. Estimate the run in credits, approve it and retrieve the finished file from the Library.
How do I generate an image with the API?
Create a key with Run access
In the app, open Organization, then API keys, and make a key at the level Run. The page also shows your organization’s ID. Keep both where your shell finds them.
Your shell export HYPERMAKE_KEY="hm_…" HYPERMAKE_ORG="org_…"Check the key
Ask whom it acts as. Any other answer says what is wrong, in words.
GET /v1/mecurl -H "Authorization: Bearer $HYPERMAKE_KEY" "https://0a2d5g5qtj.execute-api.eu-north-1.amazonaws.com/v1/me"The answer { "id": "user_01jd…", "displayName": "Ada Lovelace" }Create a space
A space is the canvas everything is built on. The answer carries its ID.
POST /spacescurl -H "Authorization: Bearer $HYPERMAKE_KEY" -H "Content-Type: application/json" \ -d '{"name":"Launch poster"}' \ "https://0a2d5g5qtj.execute-api.eu-north-1.amazonaws.com/v1/organizations/$HYPERMAKE_ORG/spaces"The answer { "id": "space_01jd…", "name": "Launch poster", "seq": 0 }Add an image model
Set SPACE to the space ID from the previous response. Find an image model in GET /v1/models, then replace MODEL_KEY with its key in the request below.
POST /spaces/{space}/nodescurl -H "Authorization: Bearer $HYPERMAKE_KEY" -H "Content-Type: application/json" \ -d '{"nodes":[{"kind":"image","name":"Poster","model":"MODEL_KEY","prompt":"A soda can on a sunlit kitchen table"}]}' \ "https://0a2d5g5qtj.execute-api.eu-north-1.amazonaws.com/v1/organizations/$HYPERMAKE_ORG/spaces/$SPACE/nodes"The answer { "seq": 1, "nodes": [{ "id": "node_01jd…", "name": "Poster" }], "problems": [] }Estimate, then run
The estimate returns the credit cost without starting a run. In the start request, replace the example ID with a new run_ TypeID using UUIDv7 and set approvedCredits to the amount you approve.
POST /runs/estimate, then POST /runscurl -H "Authorization: Bearer $HYPERMAKE_KEY" -H "Content-Type: application/json" -d '{"kind":"all"}' "https://0a2d5g5qtj.execute-api.eu-north-1.amazonaws.com/v1/organizations/$HYPERMAKE_ORG/spaces/$SPACE/runs/estimate" curl -H "Authorization: Bearer $HYPERMAKE_KEY" -H "Content-Type: application/json" \ -d '{"id":"run_01jd…","target":{"kind":"all"},"approvedCredits":12}' \ "https://0a2d5g5qtj.execute-api.eu-north-1.amazonaws.com/v1/organizations/$HYPERMAKE_ORG/spaces/$SPACE/runs"The answer { "credits": 12, "jobs": 1, "results": 1 } { "id": "run_01jd…", "status": "running", "approvedCredits": 12 }Retrieve the generated image
Set RUN to the run ID and poll its status. When it succeeds, find the image in the space’s results. Set FILE to its fileId and request the Library file for its download link.
GET /runs/{run}, then GET /resultscurl -H "Authorization: Bearer $HYPERMAKE_KEY" "https://0a2d5g5qtj.execute-api.eu-north-1.amazonaws.com/v1/organizations/$HYPERMAKE_ORG/spaces/$SPACE/runs/$RUN" curl -H "Authorization: Bearer $HYPERMAKE_KEY" "https://0a2d5g5qtj.execute-api.eu-north-1.amazonaws.com/v1/organizations/$HYPERMAKE_ORG/spaces/$SPACE/results" curl -H "Authorization: Bearer $HYPERMAKE_KEY" "https://0a2d5g5qtj.execute-api.eu-north-1.amazonaws.com/v1/organizations/$HYPERMAKE_ORG/library/files/$FILE"The answer { "run": { "status": "succeeded", "spentCredits": 12 }, "jobs": { "items": [ … ] } }