Use the OpenAI SDK
Keep your OpenAI request. Change the base URL, API key, and model ID.
Use the openai package for Python or Node. The same client can send your existing Chat Completions requests to Gradiated.
Install
Chat Completions
Choose an exact ID from models and pricing. This example uses the default service tier.
Responses API
Use the same client for Responses requests.
Gradiated does not support stored Responses state. Send the complete input with each request.
Stream output
Streaming returns text while the model is still generating it.
Call tools
Send function definitions with the request. Your application validates the arguments and runs the selected function.
Check service tiers, model parameters, and retry behavior before deploying to production.