FC SAS Token exposes an OpenAI-compatible API: one call format across many models, with text, image and video behind a single entry point.
Send Authorization: Bearer sk-your-key on every request. Create keys (prefixed sk-) in the console - never hard-code them in frontend code.
POST https://api.fcsas.cn/v1/chat/completions, passing the model id in model (see Models).
curl https://api.fcsas.cn/v1/chat/completions \
-H "Authorization: Bearer sk-你的密钥" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-chat",
"messages": [{"role":"user","content":"你好,介绍一下蜂巢词元"}]
}'
import os, requests
api_key = os.environ["FCSAS_KEY"]
resp = requests.post(
"https://api.fcsas.cn/v1/chat/completions",
headers={"Authorization": "Bearer " + api_key},
json={"model": "deepseek-chat",
"messages": [{"role": "user", "content": "你好"}]},
)
print(resp.json()["choices"][0]["message"]["content"])
const res = await fetch("https://api.fcsas.cn/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.FCSAS_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "deepseek-chat",
messages: [{ role: "user", content: "你好" }],
}),
});
const data = await res.json();
console.log(data.choices[0].message.content);
POST https://api.fcsas.cn/v1/images/generationsPOST https://api.fcsas.cn/v1/video/generationsMedia is metered on its own channel, so it is never double-charged against text tokens. See Pricing.
| HTTP | Meaning | What to do |
|---|---|---|
| 400 | Bad request | Check the model and messages structure |
| 401 | Invalid or missing key | Check the Authorization header and your sk- key |
| 429 | Rate limit or quota | Lower concurrency, or top up |
| 402 | Insufficient balance | Top up via WeChat Pay in the console |
| 5xx | Upstream or gateway error | Retry; contact support if it persists |