Our platform is perfectly compatible with documents in the OpenAI API format. By modifying the configuration, you can use the OpenAI SDK or softwares compatible with the OpenAI API to access the MaxAPI API.
Invoke The Chat API#
Once you have obtained an API key, you can access the MaxAPI API using the following example scripts. This is a non-stream example, you can set the stream parameter to true to get stream response.# python3
# please install OpenAI SDK first: `pip3 install openai`
from openai import OpenAI
client = OpenAI(
base_url="https://api.maxapi.ai",
api_key="Your-Key"
)
response = client.chat.completions.create(
model="gpt-4.5-preview",
messages=[
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": "Hello"},
],
stream=False
)
print(response.choices[0].message.content)
Model group price#
The default group price is 50% of the official price, official API + Azure/Aws + reverse intelligent load balancing, 90% availability
VIP group price is 80% of the official price, original official API, 99.5% availability
SVIP group price is 100% of the official price, official enterprise API, 99.9% availabilityYou only need to edit the key and switch the group at the bottom of the edit window to use models with different prices.