Quickstart

Sixty seconds from a fresh signup to your first joule-billed request.

1 · Create an account

Open portal.greenjoules.cloud, sign in with a passkey, put $5 on file via Stripe, USDC, or reward points. You're now on the cloud.

2 · Mint an API token

In the portal under Tokens, click New token. Tokens are prefixed with jc_. Treat them as secrets.

3 · Make your first inference call

Point any OpenAI-compatible client at https://api.greenjoules.cloud/v1. Drop-in.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.greenjoules.cloud/v1",
    api_key="jc_…"
)

r = client.chat.completions.create(
    model="auto",
    messages=[{"role":"user","content":"hi"}],
)

print(r.choices[0].message.content)
print(r.response.headers["x-energy-joules"])  # e.g. 0.31

What's model="auto" doing?

The router classifies your request into a cost tier (lookup, extraction, aggregation, reasoning) and routes it to the cheapest capable silicon on the mesh. If you want to pin a specific model, name it explicitly — e.g. "llama-3.3-70b-instruct", "claude-haiku-4.5", "gpt-oss-120b".

4 · Read the receipt

Every response includes an X-Energy-Joules header. The same number lands on your portal balance ledger within seconds. You can also pull it back from the API:

curl https://api.greenjoules.cloud/v1/usage/last \
  -H "Authorization: Bearer jc_…"

# {
#   "request_id":  "req_018a...",
#   "model":       "llama-3.3-70b-instruct",
#   "energy_j":    0.31,
#   "carbon_mg":   0.07,
#   "operator":    "Nebius",
#   "region":      "eu-helsinki"
# }

5 · Deploy a whole stack

For workloads beyond inference, write a small invisible.hcl and ship it.

workload "site" {
  image  = "nginx:alpine"
  region = "auto"             # carbon-aware placement
  energy_budget = "10 kJ/day" # hard ceiling
}

route "api.example.com" {
  to = workload.site
}

Then:

invisible deploy

The console returns the live URL and a continuous joule readout. Set an energy budget if you want a hard ceiling — runaway loops trip the budget rather than your bank account.

Next steps