Make API Calls Quickly
The platform is fully compatible with the OpenAI Official API standard. You only need to modify two core configurations:
- Base URL:
https://api.basamp.com(or the gateway domain provided by your console) - API Key: The
sk-xxxxxxyou created in the console
🌐 Make HTTP Requests with cURL
curl https://api.basamp.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-YOUR_API_KEY_HERE" \
-d '{
"model": "gpt-4o",
"messages": [
{"role": "system", "content": "You are a rigorous assistant."},
{"role": "user", "content": "Please introduce the advantages of New API in one sentence."}
],
"stream": false
}'
🐍 Use Python (Official OpenAI SDK)
First install the dependency:
pip install openai
Write a Python script:
from openai import OpenAI
client = OpenAI(
# Replace with the platform's Base URL
base_url="https://api.basamp.com/v1",
# Replace with your Token API Key
api_key="sk-YOUR_API_KEY_HERE"
)
response = client.chat.completions.create(
model="claude-3-5-sonnet", # Supports multi-model names directly
messages=[
{"role": "user", "content": "Write a Python quicksort code"}
],
stream=True # Enable streaming response
)
for chunk in response:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
🖥️ Configure in Client Applications
In the client's API settings:
- Provider Type: Select
OpenAIorCustom - Base URL / Interface Address: Fill in
https://api.basamp.com - API Key: Fill in
sk-xxxxxx - Model List: Manually add or pull supported models such as
gpt-4o,claude-3-5-sonnet,deepseek-chat, etc.