Installation
Install the OpenAI Python SDK:Configuration
Configure the client to point to our API:Compatible Endpoints
Chat Completions
Chat Completions
Completions
Completions
Embeddings
Embeddings
Models
Models
Differences from OpenAI
While our API maintains compatibility with the OpenAI SDK, note the following differences:Important Differences:
- Model names are specific to our platform
- Some advanced parameters may not be supported
- Rate limits differ from OpenAI’s limits
Error Handling
Handle errors using standard try-except blocks:Migration Guide
To migrate from OpenAI to our API:- Update the
base_urlparameter in your client configuration - Replace OpenAI model names with our model identifiers
- Update your API key to use our platform’s key
- Test your implementation with our endpoints