API 文档
API Endpoints
All API endpoints supported by smai.ai
Endpoint List
smai.ai provides the following API endpoints:
| Endpoint | Purpose | URL |
|---|---|---|
| Standard Endpoint | General API base address | https://api.smai.ai/v1 |
| Chat Completions | Conversation completion | https://api.smai.ai/v1/chat/completions |
| Responses | Inference model specific | https://api.smai.ai/v1/responses |
| Models | Get list of models | https://api.smai.ai/v1/models |
Standard Endpoint
https://api.smai.ai/v1This is the base address for the API, which should be configured when using the SDK.
from openai import OpenAI
client = OpenAI(
api_key="sk-your-api-key",
base_url="https://api.smai.ai/v1" # Standard Endpoint
)Chat Completions Endpoint
https://api.smai.ai/v1/chat/completionsUsed for conversation completion, supporting most models. See Chat Completions API for details.
Responses Endpoint
https://api.smai.ai/v1/responsesInference models must use this endpoint
The following models must use the Responses endpoint:
- gpt-5.2-pro
- o3-pro
- o3-mini
- Other inference models
See Responses API for details.
Models Endpoint
https://api.smai.ai/v1/modelsGet the list of currently available models:
curl https://api.smai.ai/v1/models \
-H "Authorization: Bearer sk-your-api-key"Base Endpoint
https://api.smai.aiThe base address without a version number, which some applications may need to use.
Endpoint Selection Guide
graph TD
A[Select Endpoint] --> B{Is it an inference model?}
B -->|Yes| C[Use Responses Endpoint]
B -->|No| D[Use Chat Completions Endpoint]
C --> E[/v1/responses]
D --> F[/v1/chat/completions]