Guide to connecting BytePlus ModelArk models via standard OpenAI API format.
Ecomdy API Gateway is 100% compatible with official OpenAI SDKs (`openai` Python package, `openai` npm module). Simply install the standard OpenAI library and update your Base URL.
from openai import OpenAI
# Instant BytePlus GLM-5.2 integration via Ecomdy API Gateway
client = OpenAI(
base_url="https://ecomdy-api.vercel.app/v1",
api_key="sk-bp-testkey" # API Key from Ecomdy Console
)
response = client.chat.completions.create(
model="glm-5.2",
messages=[{"role": "user", "content": "Hello! Write a 15s TikTok Ads script for a new product."}],
stream=True
)
for chunk in response:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")All HTTP requests to Ecomdy API must include the Authorization header:
You can create and manage your API Keys inside the Console Dashboard.
/v1/chat/completionsText completions & LLM reasoning using `dola-seed-2.1-turbo`, `dola-seed-2.0-mini`, `glm-5.2`. Supports `stream: true` for Server-Sent Events.
/v1/images/generationsSeedreamHigh-definition AI image generation using `seedream-5.0-lite` or `seedream-4.5` models.
/v1/videos/generationsSeedance 1.5 ProShort AI video generation with automated audio matching for TikTok (Model: `seedance-1.5-pro`).
| Public Model ID | Provider | Category | Ecomdy Retail Price |
|---|---|---|---|
| dola-seed-2.1-turbo | ByteDance | LLM Text | $0.65 / 1M tokens |
| dola-seed-2.0-mini | ByteDance | LLM Text | $0.195 / 1M tokens |
| glm-5.2 | Z.AI | LLM Text | $1.82 / 1M tokens |
| seedream-5.0-lite | ByteDance | AI Image | $0.0455 / image |
| seedream-4.5 | ByteDance | AI Image | $0.0520 / image |
| seedance-1.5-pro | ByteDance | AI Video | $0.0780 / 5s video |