v1/chat/completions and v1/completions, and embeddings match v1/embeddings.
Installation
Install the Python SDK:Authentication
Initialize the client or send a request with your API key. Treat the key like a password.Create and manage API keys
Initialize the client
Send a request
Replaceyour-model-id with the ID from the Models page (click Model ID on your deployment).
Stream a response
Addstream=True to receive tokens as they are generated:
Next steps
- Browse Examples for every supported pipeline task.
- Migrate from OpenAI if you already use OpenAI-compatible libraries.
- Read the API overview for errors, rate limits, and endpoint compatibility.

