321AI Model MarketplaceLive marketplace →

Connect Python OpenAI SDK to 321AI

Dev integration · configuration guide + live pricing · sign up for trial credit

The most universal integration: the official OpenAI Python SDK needs only a base_url change — no other code touches.

Python OpenAI SDK in one line: Official OpenAI SDK: change base_url, nothing else. Recommended models and their market floor prices are in the table below; the full catalog is at https://321ai.cc/en/models/.

Sign up & get trial creditSee live pricing

Configuration

SettingValueNotes
base_urlhttps://321ai.cc/v1required
api_keyAPI key from the console
modela model name on sale

Steps

1. pip install openai

2. Pass base_url and api_key when constructing the client

3. Call chat.completions.create with the platform model name

Recommended models (live market floor)

WhatWhereNotes
Live market floor pricinghttps://321ai.cc/en/models/input per 1M tokens, per-supplier quotes on the marketplace

Prices are the multi-supplier market floor and move in realtime; see all model prices →

FAQ

Is streaming supported?

Yes — pass stream=True; usage matches the official SDK.

How do I switch between two models?

Change only the model parameter; no need to rebuild the client.

Other setup guides

Claude Code Cursor Cherry Studio Cline Dify Immersive Translate LobeChat NextChat Open WebUI Codex CLI LangChain LiteLLM
All model pricesFeatured · 321AI communityFeatured · Open-source toolsFeatured · Advertise with usFeatured