Skip to main content

Developer quickstart

Make your first API call: list the Addons your account can run.

Before you start​

You need a Ghostpull account and curl. The commands come for bash and zsh, fish, and PowerShell 7 or later; pick your shell in the tabs.

Steps​

  1. In the web app, open Settings › API keys and select Create API key.

  2. Name it, select List Addons, choose when it expires, and select Create key.

  3. Copy the key. Ghostpull shows it only once.

  4. Call the API with it:

    export GHOSTPULL_URL="https://ghostpull.chopchop.shop"
    export GHOSTPULL_API_KEY="gp_…"

    curl "$GHOSTPULL_URL/api/v1/addons" -H "x-api-key: $GHOSTPULL_API_KEY"

The answer lists each Addon with the inputs it needs and what a run costs in credits:

{
"addons": [
{
"id": "lifestyle-scene",
"title": "Lifestyle scene",
"description": "…",
"inputs": [],
"pricing": { "credits": 10 }
}
]
}

inputs lists what a run of the Addon needs; it is shortened here.

Next​