> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codeflare.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeSafe System One

> Submit structured Noul, Choice, and Score judgments.

## Native structured judgments

Use `POST /v1/systemone` with a Codeflare Bearer key and a platform model with `systemone` support. This protocol is separate from chat. Requests contain only `model`, `state`, and `questions`.

```bash cURL theme={null}
curl "https://YOUR-REGION.example/v1/systemone" \
  -H "Authorization: Bearer $CODEFLARE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "MODEL_ID",
    "state": {"message": "My invoice was charged twice. Please help."},
    "questions": {
      "billing": {
        "type": "noul",
        "instructions": "Is this a billing issue?"
      },
      "team": {
        "type": "choice",
        "instructions": "Which team should handle this?",
        "criteria": {"billing": "Payments and invoices", "support": "Other requests"}
      },
      "urgency": {
        "type": "score",
        "instructions": "How time-sensitive is the request?",
        "criteria": ["Can wait", "Needs attention soon", "Needs immediate attention"]
      }
    }
  }'
```

## Question types

| Type | Purpose |
| - | - |
| `noul` | Judge whether a proposition is true |
| `choice` | Choose among named criteria |
| `score` | Score against ordered criteria |

Inputs can be strings, JSON objects, or arrays. Responses retain native `model`, `answers`, and `usage`, including probabilities and confidence. The returned model identifies the actual serving version. The upstream service determines context and per-question limits.

## Limits and failure handling

Streaming, background work, chat `messages`, token counting, and generation-length parameters are unsupported. There is no chat-protocol conversion. Platform `GET /v1/models` still has an OpenAI envelope, so do not assume compatibility with the TypeSafe SDK's model-list format.

Upstream 422, 429, and 529 statuses are retained with sanitized errors, without automatic retries. Missing or invalid usage enters unknown-cost reconciliation and must not be treated as a free call.

Check the console and [official TypeSafe documentation](https://docs.typesafe.ai/api) for models, context limits, and prices. This guide does not pin upstream versions or prices.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.