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

# Make a decision

> Answer one or more typed questions about a single state.



## OpenAPI

````yaml /openapi.yaml post /v1/decide
openapi: 3.1.0
info:
  title: Tacet API
  version: 2026-10
  description: |
    Send a state and typed questions; get calibrated probabilities back as JSON.
    Every answer is one of the options you listed, with a probability for each.
servers:
  - url: https://api.tacetai.com
security:
  - bearerAuth: []
tags:
  - name: Decide
    description: Answer questions about one state, synchronously.
  - name: Batches
    description: >-
      Answer the same questions for a large JSONL file of records,
      asynchronously.
paths:
  /v1/decide:
    post:
      tags:
        - Decide
      summary: Make a decision
      description: Answer one or more typed questions about a single state.
      operationId: decide
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecideRequest'
            example:
              model: tacet-alpha
              state: The payment failed. The login works.
              questions:
                route:
                  type: choice
                  instructions: Which team handles the problem?
                  criteria:
                    payments: Payment failures
                    account: Login access
      responses:
        '200':
          description: Calibrated probabilities for every question.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecideResponse'
              example:
                id: dec_8f2c1a
                model: tacet-alpha
                answers:
                  route:
                    type: choice
                    probs:
                      payments: 0.97
                      account: 0.03
                    top: payments
                    confidence: 0.97
                usage:
                  input_tokens: 61
        '400':
          $ref: '#/components/responses/InvalidQuestion'
        '401':
          $ref: '#/components/responses/InvalidKey'
        '413':
          $ref: '#/components/responses/StateTooLong'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
      x-codeSamples:
        - lang: python
          label: Python
          source: |
            from tacet import Tacet

            client = Tacet()  # reads TACET_API_KEY

            result = client.decide(
                model="tacet-alpha",
                state="The payment failed. The login works.",
                questions={
                    "route": {
                        "type": "choice",
                        "instructions": "Which team handles the problem?",
                        "criteria": {"payments": "Payment failures", "account": "Login access"},
                    }
                },
            )
            print(result.answers["route"].top)
        - lang: typescript
          label: TypeScript
          source: |
            import Tacet from "@tacet/sdk";

            const client = new Tacet(); // reads TACET_API_KEY

            const result = await client.decide({
              model: "tacet-alpha",
              state: "The payment failed. The login works.",
              questions: {
                route: {
                  type: "choice",
                  instructions: "Which team handles the problem?",
                  criteria: { payments: "Payment failures", account: "Login access" },
                },
              },
            });
            console.log(result.answers.route.top);
        - lang: bash
          label: curl
          source: |
            curl https://api.tacetai.com/v1/decide \
              -H "Authorization: Bearer $TACET_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "model": "tacet-alpha",
                "state": "The payment failed. The login works.",
                "questions": {
                  "route": {
                    "type": "choice",
                    "instructions": "Which team handles the problem?",
                    "criteria": {"payments": "Payment failures", "account": "Login access"}
                  }
                }
              }'
components:
  schemas:
    DecideRequest:
      type: object
      required:
        - model
        - state
        - questions
      properties:
        model:
          $ref: '#/components/schemas/ModelId'
        state:
          description: What the model should look at. Objects are sent as JSON text.
          oneOf:
            - type: string
            - type: object
        questions:
          type: object
          description: Map of your question ids to question objects.
          additionalProperties:
            $ref: '#/components/schemas/Question'
    DecideResponse:
      type: object
      required:
        - id
        - model
        - answers
        - usage
      properties:
        id:
          type: string
          description: Request id. Store it with each decision for audits.
        model:
          type: string
        answers:
          type: object
          description: One answer per question id in the request.
          additionalProperties:
            $ref: '#/components/schemas/Answer'
        usage:
          type: object
          properties:
            input_tokens:
              type: integer
    ModelId:
      type: string
      description: >-
        Model id. Use `tacet-alpha` for the latest, or a dated id such as
        `tacet-alpha-2026-10` to pin it.
      example: tacet-alpha
    Question:
      type: object
      required:
        - type
        - instructions
      properties:
        type:
          $ref: '#/components/schemas/QuestionType'
        instructions:
          type: string
          description: The question, in plain language.
        criteria:
          type: object
          description: >
            Option keys and their descriptions, 2 to 26 options. Optional for
            `noul`, where the

            options are `no` and `yes`. For `score`, keys must be numeric levels
            such as "0", "1", "2".
          minProperties: 2
          maxProperties: 26
          additionalProperties:
            type: string
    Answer:
      type: object
      required:
        - type
        - probs
        - top
        - confidence
      properties:
        type:
          $ref: '#/components/schemas/QuestionType'
        probs:
          type: object
          description: A calibrated probability for every option. Values sum to 1.
          additionalProperties:
            type: number
            minimum: 0
            maximum: 1
        top:
          type: string
          description: The option with the highest probability.
        confidence:
          type: number
          description: The probability of `top`.
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - invalid_question
            - invalid_key
            - state_too_long
            - rate_limited
            - not_found
            - server_error
        message:
          type: string
    QuestionType:
      type: string
      enum:
        - noul
        - choice
        - score
      description: >-
        `noul` checks a condition (no / yes), `choice` picks from named options,
        `score` assigns an ordered level.
  responses:
    InvalidQuestion:
      description: >-
        `invalid_question`: check the type and that criteria has 2 to 26
        options.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InvalidKey:
      description: '`invalid_key`: check the Authorization header.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    StateTooLong:
      description: '`state_too_long`: trim the state or split it across requests.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: '`rate_limited`: wait for the time in the Retry-After header, then retry.'
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: '`server_error`: retry with backoff. Contact us if it continues.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Create a key in the Tacet console. Keep it on your server; never ship it
        in a browser or app.

````

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