Create a System One decision request (TypeSafe)
[Alpha]Make yes/no judgments, option selections, or scoring assessments based on the given input, suited for quick decision scenarios. This API is still in a testing and validation stage; it may be adjusted or discontinued. Free of charge until 2026-10-08 (inclusive); if charging starts after that, it will be announced separately.
Set the header 'Authorization: Bearer {your API key}' for authentication
In: header
Header Parameters
Request trace ID. Optionally pass your own value to tag this request; if omitted, the platform generates one. When troubleshooting, you can provide either this value or the x-siliconcloud-trace-id response header.
Standard W3C Trace Context header. When provided, the platform uses its trace-id as the trace identifier for this request.
Request form where every question in questions is of the noul type (yes/no). Question types may also be mixed within the same questions map; they are shown split by type here.
The model handling this request. Currently supported: diffusiongemma, Kev-4b, SemIf.
"diffusiongemma"The content all questions are evaluated against. It can be a string, a JSON object, or an array.
- A string suits a full text passage;
- An object suits structured fields, and can be referenced by field name in
instructions; - An array suits a list of texts or objects.
Nested structures inside objects and arrays are not restricted.
Empty Object
A map of questions. Keys are chosen by the caller and only used to fill answers; the response answers uses the same keys.
1 <= propertiesEmpty Object
Request form where every question in questions is of the choice type (single choice). Question types may also be mixed within the same questions map; they are shown split by type here.
The model handling this request. Currently supported: diffusiongemma, Kev-4b, SemIf.
"diffusiongemma"The content all questions are evaluated against. It can be a string, a JSON object, or an array.
- A string suits a full text passage;
- An object suits structured fields, and can be referenced by field name in
instructions; - An array suits a list of texts or objects.
Nested structures inside objects and arrays are not restricted.
Empty Object
A map of questions. Keys are chosen by the caller and only used to fill answers; the response answers uses the same keys.
1 <= propertiesEmpty Object
Request form where every question in questions is of the score type (rating). Question types may also be mixed within the same questions map; they are shown split by type here.
The model handling this request. Currently supported: diffusiongemma, Kev-4b, SemIf.
"diffusiongemma"The content all questions are evaluated against. It can be a string, a JSON object, or an array.
- A string suits a full text passage;
- An object suits structured fields, and can be referenced by field name in
instructions; - An array suits a list of texts or objects.
Nested structures inside objects and arrays are not restricted.
Empty Object
A map of questions. Keys are chosen by the caller and only used to fill answers; the response answers uses the same keys.
1 <= propertiesEmpty Object
Response Body
Model response. The response header includes x-siliconcloud-trace-id, the unique trace identifier for this request, which helps with log queries and troubleshooting. Any X-Trace-Id request header you passed in is echoed back in this field. When troubleshooting, provide either trace ID.
TypeScript Definitions
Use the response body type in TypeScript.
Successful response for POST /systemone (answers maps keys to NoulAnswer).
The model that handled this request.
"diffusiongemma"An answer map keyed exactly like the request questions: no key missing, no key added.
Empty Object
Token usage for this request. Input tokens are billed; output tokens are currently free.
Successful response for POST /systemone (answers maps keys to ChoiceAnswer).
The model that handled this request.
"diffusiongemma"An answer map keyed exactly like the request questions: no key missing, no key added.
Empty Object
Token usage for this request. Input tokens are billed; output tokens are currently free.
Successful response for POST /systemone (answers maps keys to ScoreAnswer).
The model that handled this request.
"diffusiongemma"An answer map keyed exactly like the request questions: no key missing, no key added.
Empty Object
Token usage for this request. Input tokens are billed; output tokens are currently free.
curl --request POST \
--url https://api.siliconflow.cn/v1/systemone \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ***" \
-d '{
"model": "diffusiongemma",
"state": "My withdrawal has failed for three days in a row and support has not replied. Please handle this as soon as possible!",
"questions": {
"is_urgent": {
"type": "noul",
"instructions": "Does this message convey urgency?"
}
}
}'
curl --request POST \
--url https://api.siliconflow.cn/v1/systemone \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ***" \
-d '{
"model": "diffusiongemma",
"state": "My withdrawal has failed for three days in a row and support has not replied. Please handle this as soon as possible!",
"questions": {
"department": {
"type": "choice",
"instructions": "Which team should handle this?",
"criteria": {
"billing": "Invoicing, refunds, and payment issues",
"technical": "Bugs, outages, and integrations",
"support": "Service attitude and response times"
}
}
}
}'
curl --request POST \
--url https://api.siliconflow.cn/v1/systemone \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ***" \
-d '{
"model": "diffusiongemma",
"state": "My withdrawal has failed for three days in a row and support has not replied. Please handle this as soon as possible!",
"questions": {
"frustration": {
"type": "score",
"instructions": "How frustrated is the customer?",
"criteria": ["Calm", "Slightly annoyed", "Clearly annoyed", "Very angry"]
}
}
}'
from typesafe_sdk import Choice, Noul, Score, TypeSafeClient
# Point the client at SiliconFlow: the SDK appends /v1/systemone to base_url.
# The API key is read from the TYPESAFE_API_KEY environment variable,
# or can be passed via the api_key parameter.
with TypeSafeClient(
base_url="https://api.siliconflow.cn",
model="diffusiongemma",
) as client:
result = client.system_one(
"My withdrawal has failed for three days in a row and support has not replied. Please handle this as soon as possible!",
{
"is_urgent": Noul(instructions="Does this message convey urgency?"),
"department": Choice(
instructions="Which team should handle this?",
criteria={
"billing": "Invoicing, refunds, and payment issues",
"technical": "Bugs, outages, and integrations",
"support": "Service attitude and response times",
},
),
"frustration": Score(
instructions="How frustrated is the customer?",
criteria=["Calm", "Slightly annoyed", "Clearly annoyed", "Very angry"],
),
},
)
print(result.nouls["is_urgent"].noul)
print(result.choices["department"].choice)
print(result.scores["frustration"].score
{
"model": "diffusiongemma",
"answers": {
"property1": {
"type": "noul",
"noul": 0.92
},
"property2": {
"type": "noul",
"noul": 0.92
}
},
"usage": {
"input_tokens": 296,
"output_tokens": 20
}
}{
"code": 20012,
"message": "string",
"data": "string"
}"Invalid token""Forbidden""404 page not found"{
"message": "Request was rejected due to rate limiting. If you want more, please contact contact@siliconflow.cn. Details:TPM limit reached.",
"data": "string"
}{
"code": 50505,
"message": "Model service overloaded. Please try again later.",
"data": "string"
}"string"