Skip to main content

Get an API key

Go to the Account Management submenu on the console and open Interface Keys to create a key.

Environment setup

Install Python dependencies

Python users can reuse the OpenAI SDK:

Install cURL

Install curl with your OS package manager:
  1. Debian/Ubuntu (apt):
  2. CentOS (yum or dnf; CentOS 8+ uses dnf):
    • With yum:
    • With dnf (CentOS 8):
  3. macOS (brew; install Homebrew from brew.sh if needed):

Test a basic API request

Once you have installed the required dependencies and obtained an API key, you can make requests using the Python SDK or curl. Below are simple examples using Python and curl.
copy

Response

The responses for both streaming and non-stream requests are similar to the following:
copy
Some example error responses are shown below(for detailed error information, see the Error Codes documentation):
  • Request Timeout Mechanism:A time limit of 10 minutes is set for each request. If a request is not completed within this time limit, the system will stop waiting, immediately terminate the request, and return an error response with status code 503.
  • Rate Limiting:The system also enforces rate limits to control the frequency of requests. If a user’s request rate exceeds the allowed limit, the system will not process the excess requests and will instead return an error response with status code 429. This error indicates “Too Many Requests”, meaning that too many requests have been sent within a given time window.