Quick start
Easy to use, compatible with all OpenAI SDK models only need to change the base url and model
Model access guide
Before attempting to access our one-stop service interface, make sure to follow these steps to ensure a worry-free experience:
- Check your account balance to see if the funds are sufficient.
- Visit our billing Rules page to learn more about the fees for different models to help you plan your budget.
Quick start
port:Base url
https://api.zgiai.com/v1
Under the project folder, install the packages that the project depends on
# Download the openai package
pip install openai
Create a new index.py file
from openai import OpenAI
client = OpenAI(
api_key = "Own API key",
base_url = "https://api.zgiai.com/v1"
)
chat_completion = client.chat.completions.create(
messages=[
{
"role": "user",
"content": "Tell a joke",
}
],
model="gpt-3.5-turbo", #Please refer to the list of models to replace other models here eg: google/gemma-7b-it
)
print(chat_completion.choices[0].message.content)
Technical support
ZGI technical support » Add wechat: starkwang_