smai.aismai.ai
Quick Start

Quick Start

Get started with smai.ai

Getting Started

You can start using smai.ai's AI services in just three steps.

Create an API Token

After logging in, create your API token in the console.

View Token Management

How to create and manage API tokens

Start Calling

Use your API token to call smai.ai's API.

from openai import OpenAI

client = OpenAI(
    api_key="your-api-key",
    base_url="https://api.smai.ai/v1"
)

response = client.chat.completions.create(
    model="gpt-4.1",
    messages=[
        {"role": "user", "content": "你好!"}
    ]
)

print(response.choices[0].message.content)

On this page