FC SAS Token FC SAS Token · by Fengchao Surges
中文
Home / Docs

Developer Docs

FC SAS Token exposes an OpenAI-compatible API: one call format across many models, with text, image and video behind a single entry point.

1. Authentication

Send Authorization: Bearer sk-your-key on every request. Create keys (prefixed sk-) in the console - never hard-code them in frontend code.

2. Chat completions

POST https://api.fcsas.cn/v1/chat/completions, passing the model id in model (see Models).

curl

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":"你好,介绍一下蜂巢词元"}]
  }'

Python

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"])

Node.js

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);

3. Images and video

Media is metered on its own channel, so it is never double-charged against text tokens. See Pricing.

4. Error codes

HTTPMeaningWhat to do
400Bad requestCheck the model and messages structure
401Invalid or missing keyCheck the Authorization header and your sk- key
429Rate limit or quotaLower concurrency, or top up
402Insufficient balanceTop up via WeChat Pay in the console
5xxUpstream or gateway errorRetry; contact support if it persists

Next steps

Open the console