From your first API key
to your first request.
从第一把 API 密钥,
到第一次成功请求。
Create an account, add USD credits, and connect your application. Everything you need to get started, in one clear guide.注册账户,充值美元余额,连接你的应用。
把接入所需的步骤,清清楚楚地放在一起。
https://token.dysonx.com/v1Currency结算币种USD · US dollarsUSD · 美元01Get started
- Create your account. Open the DysonX website, select Register, and sign in.
- Add credits. Open Wallet. Follow the offline top-up process below and confirm that your balance has been credited before sending requests.
- Create an API key. Open API Keys and create a key for your application. Review its group, model restrictions, quota, and expiry. For the currently available catalogue, use the default group.
- Select an available model. In Model Square, copy the exact model ID and check its price and supported request format.
- Connect your client. Enter your DysonX key and the API base URL below. Start with a short request, then check Usage Logs.
02Add USD credits
DysonX currently uses administrator-assisted offline top-ups. Online checkout is not currently available.
- Contact the DysonX administrator through the person or channel that provided your account or access invitation. Give your account username or user ID and the USD credit amount you want.
- Confirm before paying. Agree on the authorized payment instructions and the exact USD amount to be credited. Do not use payment details from an unverified message.
- Submit your payment reference. Send the administrator the account identifier and payment reference through the agreed channel. Never send your password or full API key.
- Check Wallet. Once payment is verified and the administrator credits the account, refresh Wallet and confirm the USD balance. Payment evidence alone does not mean the account has been credited.
If credits have not arrived, ask the administrator to reconcile the payment reference and account identifier. Confirm any applicable refund or cancellation terms before paying.
02充值美元余额
DysonX 当前采用管理员协助的线下充值方式,暂未开放在线支付。
- 联系 DysonX 管理员。通过为你开通账户或提供邀请的既有联系人办理,告知账户用户名或用户 ID,以及希望充值的美元金额。
- 付款前确认。先确认收款方式和最终到账的 USD 金额。不要使用未经核实的消息中的付款信息。
- 提交付款参考信息。通过约定渠道提供账户标识和付款参考号,便于核销。不要发送密码或完整 API 密钥。
- 检查钱包到账。管理员核实收款并入账后,刷新钱包,确认美元余额。持有付款凭证不等于账户已经到账。
若尚未到账,请提供付款参考号和账户标识,请管理员核对。适用的退款或取消规则应在付款前确认。
03Connect your application
Use a client that supports a custom OpenAI-compatible API provider. Labels vary between clients; the values below are the same.
| Client setting | What to enter |
|---|---|
| Provider / API type | OpenAI-compatible / custom provider |
| Base URL / API base | https://token.dysonx.com/v1 |
| API key | Your key from DysonX → API Keys |
| Model | Exact model ID from Model Square, available to your key |
If your client automatically appends /v1, enter https://token.dysonx.com in its server-address field. Check that the final request path contains /v1 only once.
03连接你的应用
使用支持自定义 OpenAI 兼容服务的客户端。各客户端的字段名称可能不同,填写内容如下。
| 客户端设置 | 填写内容 |
|---|---|
| 服务商 / API 类型 | OpenAI-compatible / 自定义服务商 |
| Base URL / API 地址 | https://token.dysonx.com/v1 |
| API Key | 在 DysonX 的 API Keys 页面创建的密钥 |
| Model / 模型 | 模型广场中的完整模型 ID,且该密钥有权使用 |
若客户端会自动添加 /v1,其服务器地址填写 https://token.dysonx.com。确认最终请求路径中只有一个 /v1。
04API essentials
Send your API key as a bearer token over HTTPS. Keep it in a server-side environment variable rather than browser code or a public repository.
Check models available to your key
Set DYSONX_API_KEY privately in your local environment, then run:
curl https://token.dysonx.com/v1/models \
-H "Authorization: Bearer $DYSONX_API_KEY"
Send a Chat Completions request
Set DYSONX_MODEL to an exact, available model ID that supports Chat Completions. This example is a template; an actual generation request may consume credits.
curl https://token.dysonx.com/v1/chat/completions \
-H "Authorization: Bearer $DYSONX_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"model\":\"$DYSONX_MODEL\",\"messages\":[{\"role\":\"user\",\"content\":\"Say hello in one sentence.\"}]}"
Use an OpenAI-compatible SDK
If your SDK supports this request format, configure it as follows. Choose a model that supports the endpoint you call.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DYSONX_API_KEY"],
base_url="https://token.dysonx.com/v1",
)
response = client.chat.completions.create(
model=os.environ["DYSONX_MODEL"],
messages=[{"role": "user", "content": "Say hello."}],
)
print(response.choices[0].message.content)
For streaming, set stream=true in a compatible request and use a client that reads the returned event stream. Endpoint and feature support depend on the selected model; catalogue presence does not guarantee every format or optional parameter.
04API 接入示例
通过 HTTPS 发送请求,将密钥放在 Bearer 请求头中。密钥应存放在服务端环境变量中,避免写进网页代码或公开仓库。
查询该密钥可使用的模型
先在本地环境中安全设置 DYSONX_API_KEY,然后运行:
curl https://token.dysonx.com/v1/models \
-H "Authorization: Bearer $DYSONX_API_KEY"
发送 Chat Completions 请求
将 DYSONX_MODEL 设置为完整、可用且支持 Chat Completions 的模型 ID。以下是请求模板;实际生成请求可能消耗余额。
curl https://token.dysonx.com/v1/chat/completions \
-H "Authorization: Bearer $DYSONX_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"model\":\"$DYSONX_MODEL\",\"messages\":[{\"role\":\"user\",\"content\":\"Say hello in one sentence.\"}]}"
使用 OpenAI 兼容 SDK
若 SDK 支持此请求格式,可按下面配置。请确保选择的模型支持调用的端点。
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DYSONX_API_KEY"],
base_url="https://token.dysonx.com/v1",
)
response = client.chat.completions.create(
model=os.environ["DYSONX_MODEL"],
messages=[{"role": "user", "content": "Say hello."}],
)
print(response.choices[0].message.content)
如需流式输出,在兼容请求中设置 stream=true,并使用支持读取事件流的客户端。端点、输入类型和可选参数取决于具体模型;出现在模型目录中不代表支持所有格式。
05Understand prices and usage
All DysonX prices and account balances use USD. Check Model Square for current customer prices before use. This guide does not duplicate the live price list.
- Input and output are priced separately. Rates are generally shown per 1 million tokens; a token is a unit of processed text, not a fixed number of words.
- Cache and context can affect the price. Some models have separate cache-read or cache-write rates and higher prices for longer contexts. Open the model’s pricing details to see the applicable tiers.
- Image and other specialized inputs can have additional billing categories. Check the selected model’s details; do not estimate every request from text-token prices alone.
- Account balance and API-key quota are separate limits. A positive wallet balance does not override an exhausted, expired, or restricted key.
For a text-only request with no separate cache or other billing categories:
Estimated USD cost =
input tokens × input USD rate per 1M ÷ 1,000,000
+ output tokens × output USD rate per 1M ÷ 1,000,000
Use Usage Logs to inspect recorded requests, models, usage, and charges. Use Wallet for your remaining credit. For a charge question, retain the timestamp, model, request identifier if available, and the relevant log entry.
05价格与用量
DysonX 的价格和账户余额统一使用美元(USD)。使用前请到模型广场查看当前客户价格,本文档不重复维护实时价格表。
- 输入和输出分别计价。价格通常按每 100 万 tokens 展示。Token 是处理文本的计量单位,不是固定数量的汉字或单词。
- 缓存和上下文长度可能影响价格。部分模型有独立的缓存读取、缓存写入费用,长上下文也可能使用更高档位。请打开模型价格详情核对。
- 图像等特殊输入可能有额外计费类别。请查看所选模型说明,不要一律用文本 token 价格估算。
- 钱包余额和密钥额度是不同的限制。钱包有余额,不会覆盖密钥额度耗尽、过期或模型受限等情况。
仅包含文本、没有独立缓存或其他计费项目时,可以这样估算:
预计费用(USD) =
输入 tokens × 每百万输入 tokens 的美元单价 ÷ 1,000,000
+ 输出 tokens × 每百万输出 tokens 的美元单价 ÷ 1,000,000
在使用日志查看请求记录、模型、用量和扣费;在钱包查看剩余余额。若有费用疑问,请保留时间、模型、请求标识(如有)及对应日志。
06Troubleshooting
Read the returned error message as well as its status code. These are common checks; exact errors vary by model and request format.
Authentication failed / 401
Check that you used a DysonX API key rather than your account password or another provider’s key. Remove extra spaces, confirm the key is enabled and unexpired, and check the Authorization: Bearer header. Replace a compromised key.
Insufficient balance or quota
Check Wallet, the API key’s remaining quota, and any expiry or model restrictions. A request may need enough available credit for a pre-consumption check even if its final cost would be small.
Model unavailable, forbidden, or not found
Copy the exact model ID from Model Square. Check the key’s group and allowed models, then verify that the endpoint matches that model’s supported request format. A model may also be temporarily unavailable.
Invalid request, 400, or 404
Check the JSON body, required fields, and URL. For Chat Completions, the final path is /v1/chat/completions. Avoid a duplicated /v1/v1 path. Optional parameters and input types are model-dependent.
Rate limit / 429
Reduce concurrency and request frequency, then retry with increasing delays. Check your client’s automatic retry settings to avoid retry storms.
Timeout, 5xx, or interrupted stream
Check your connection and request size. Inspect Usage Logs before retrying: a client timeout does not prove that the server stopped processing. Retrying a generation can create a separate billable request.
I still need help
Contact the administrator through your established DysonX contact channel. Include the approximate time and timezone, model ID, endpoint, error message, and request identifier if available. Redact API keys, passwords, payment details, and sensitive prompt content from screenshots or logs.
06常见问题
请同时阅读 HTTP 状态码和返回的错误信息。以下为常见排查步骤;不同模型和请求格式的具体错误可能不同。
身份验证失败 / 401
确认使用的是 DysonX API 密钥,而非账户密码或其他平台的密钥。去掉多余空格,检查密钥开关、有效期及 Authorization: Bearer 请求头。密钥泄露后应更换。
余额或额度不足
检查钱包余额、密钥剩余额度、有效期和模型限制。请求可能需要足够余额通过预扣检查,即使最终实际费用很小。
模型不可用、无权访问或找不到模型
从模型广场复制准确的模型 ID,核对密钥分组、可用模型和请求端点。模型也可能暂时不可用。
请求错误 / 400 / 404
检查 JSON、必填字段和 URL。Chat Completions 的完整路径为 /v1/chat/completions,避免 /v1/v1 重复。可选参数与输入类型取决于模型。
触发限流 / 429
降低并发和请求频率,再逐步增加等待时间后重试。检查客户端自动重试配置,避免大量重复请求。
超时、5xx 或流式输出中断
检查网络和请求长度,重试前先查看使用日志。客户端超时不代表服务器已停止处理;再次生成可能形成另一笔计费请求。
仍然需要帮助
通过你现有的 DysonX 联系渠道联系管理员,提供大致时间和时区、模型 ID、端点、错误信息及请求标识(如有)。截图和日志中应遮去 API 密钥、密码、付款信息与敏感提示词内容。
07Protect your account
- Use a separate API key per application where practical. Set a suitable quota, expiry, and model restrictions.
- Keep keys out of screenshots, shared chat, frontend code, and repositories. Revoke or replace a leaked key from API Keys.
- Only send content you are authorized to process. Check the applicable service terms and privacy information before submitting personal, confidential, or regulated data.
- Do not assume API requests have zero retention or a particular storage location unless that is explicitly confirmed for your service.
This page is a usage guide. It does not establish a refund policy, data-retention commitment, or service-level guarantee.
07保护你的账户
- 条件允许时,为不同应用创建独立密钥,并设置合适的额度、有效期和模型限制。
- 不要在截图、群聊、网页前端代码或仓库中公开密钥。若已泄露,请在 API Keys 页面撤销或更换。
- 仅提交你有权处理的内容。提交个人、机密或受监管数据前,应确认适用的服务条款和隐私信息。
- 除非服务已明确确认,不应假设 API 请求零留存,或存放于某个特定地区。
本页为使用指南,不构成退款政策、数据保留承诺或服务等级保证。