Quickstart
JouleCloud speaks the OpenAI API. Point your existing SDK at our base URL, pass your organization key, and call a model. No new client library.
1. Change one line
Swap the base URL. Everything else — request shape, response shape, SDKs — stays the same.
base_url = "https://api.openai.com/v1"
→
base_url = "https://api.jouledns.com/v1"
2. Get your key
Each organization gets one gateway key, minted on demand. After you sign up, open the console to reveal, copy, or rotate it. Use it as a bearer token: Authorization: Bearer <key>. See Authentication for details.
3. Make a request
Set model to one of the served models (see Models). This example uses qwen2.5-7b-instruct.
curl https://api.jouledns.com/v1/chat/completions \
-H "Authorization: Bearer $JC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"qwen2.5-7b-instruct","messages":[{"role":"user","content":"Hello"}]}'The examples read your key from a
JC_API_KEY environment variable. Never hard-code keys into source you commit.Next
- Chat Completions — request and response shapes
- Streaming — token-by-token responses
- Errors — status codes and the error envelope
- Rate limits — per-org RPM and budget caps