Client libraries
Use an official OpenAI client for protocol-compatible requests, or use the optional JouleCloud preview helpers when you need bounded retries, idempotency, and explicit interrupted-stream handling.
OpenAI clients
Configure https://api.jouledns.com/v1 as the API origin and use an organization API key for authentication.
# pip install openai
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.jouledns.com/v1",
api_key=os.environ["JC_API_KEY"],
)
r = client.chat.completions.create(
model="qwen2.5-3b-instruct",
messages=[{"role": "user", "content": "Hello"}],
)
print(r.choices[0].message.content)Optional JouleCloud helpers
The repository includes preview helpers for Python (jcclient) and TypeScript (@jcinference/sdk). They provide typed errors, bounded retries, stable idempotency keys, and interrupted-stream detection. Install them directly from the repository; public registry packages are planned.
Other languages
A compatible Go, Ruby, Java, or raw HTTP client can call https://api.jouledns.com/v1 and send Authorization: Bearer <key>. See Chat Completions for the request and response shapes.