smai.aismai.ai
API 文档

API Overview

Overview of the smai.ai API interface

Introduction

smai.ai provides an API interface that is fully compatible with OpenAI, allowing you to connect directly using any SDK or application that supports the OpenAI API.

Basic Information

ItemValue
Base URLhttps://api.smai.ai
API Versionv1
Authentication MethodBearer Token
Request FormatJSON
Response FormatJSON

API Endpoints

Authentication

All API requests require the API token to be included in the request header:

Authorization: Bearer sk-your-api-key

Security Reminder

Do not expose your API token in client-side code. It is recommended to proxy API requests through a backend service.

Quick Example

curl https://api.smai.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-your-api-key" \
  -d '{
    "model": "gpt-4.1",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello!"}
    ]
  }'

Request Limits

  • Rate Limit: Different request rate limits apply based on account level
  • Concurrency Limit: There is a limit on the number of simultaneous requests
  • Token Limit: The number of tokens per request is limited by the model

If you encounter limits, please try again later or contact customer service to upgrade your account.

On this page