Quickstart
Send your first request with the OpenAI SDK, Anthropic SDK, or cURL. You need a Gradiated API key and the model you'd like to use.
Send a request
from openai import OpenAI
import os
client = OpenAI(
base_url="https://api.gradiated.com",
api_key=os.environ["GRADIATED_API_KEY"],
)
response = client.chat.completions.create(
model="YOUR_MODEL",
messages=[{"role": "user", "content": "Hello from Gradiated."}],
)
print(response.choices[0].message.content)
Configuration
Both SDKs use https://api.gradiated.com as the base URL. Choose a model from models and pricing and replace YOUR_MODEL with your choice.
Store the key as an environment variable named GRADIATED_API_KEY in your server environment. Never include it in browser or mobile application code.
Next steps
- Tune latency and cost with service tiers.
- See the OpenAI SDK or Anthropic SDK guide for streaming and tool calling.


