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

# Run Jev decisions

> Run decisions using TypeSafe's Jev request and response format.



## OpenAPI

````yaml /openapi.json post /v1/systemone
openapi: 3.1.0
info:
  title: DecisionOne workbench
  description: >-
    Native decisions, immutable datasets, adaptation and shared-base deployment.
    Authenticate with `Authorization: Bearer d1_sk_...` when accounts are on. A
    short guide for coding agents is at /llms.txt. Hosted account APIs accept a
    Bearer API key or a browser session. Browser mutations require the
    configured Origin and X-CSRF-Token from /auth/session. Account recovery and
    history remain available to blocked accounts. Waitlisted accounts can read
    their account summary and model catalogue and request early access; private
    member APIs require admission. Money fields ending in _usd are exact decimal
    strings; never interpret them as integer cents. Authenticated customer reads
    and existing-operation replays share read_rpm. Exhausted budgets return 429
    with Retry-After; unavailable admission storage returns 503.
  version: 0.1.0
servers:
  - url: https://console.sqwish.ai
security: []
tags:
  - name: Decisions
    description: Probabilities for questions with fixed outcomes.
  - name: Feedback
    description: Report outcomes and turn them into training data.
  - name: Models
    description: Base models, adapters and named models with versions.
  - name: Datasets
    description: Validated training examples. A dataset never changes.
  - name: Fine-tuning
    description: Training jobs, their events and held-out results.
  - name: Prompt tuning
    description: Better wording for a decision, tested on your rows. Words, not weights.
  - name: Labeling
    description: Teacher labels for real queries, reviewed by you.
  - name: Accounts
    description: Email OTP sign-in, revocable sessions, security and API keys.
  - name: Billing
    description: Exact USD balances, purchases, automatic top-ups and referrals.
  - name: Integrations
    description: Endpoints other tools call, such as Claude Code.
  - name: System
    description: Health and discovery.
paths:
  /v1/systemone:
    post:
      tags:
        - Decisions
      summary: Run Jev decisions
      description: Run decisions using TypeSafe's Jev request and response format.
      operationId: systemone
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 255
            pattern: ^[!-~]+$
          description: >-
            Reuse the same key and body after a lost response. A successful
            replay does not execute or charge again. Changed request bodies
            conflict; expired replay bodies are not executed again under the old
            key.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JevRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                properties:
                  id:
                    type: string
                    title: Id
                  model:
                    type: string
                    title: Model
                  answers:
                    additionalProperties:
                      anyOf:
                        - $ref: '#/components/schemas/JevBoolean'
                        - $ref: '#/components/schemas/JevChoice'
                        - $ref: '#/components/schemas/JevScore'
                    title: Answers
                    type: object
                  usage:
                    $ref: '#/components/schemas/JevUsage'
                  timing_ms:
                    $ref: '#/components/schemas/Timing'
                  provenance:
                    $ref: '#/components/schemas/Provenance'
                  version:
                    title: Version
                    type: string
                  fallback:
                    $ref: '#/components/schemas/Fallback'
                  charge:
                    $ref: '#/components/schemas/Charge'
                required:
                  - model
                  - answers
                  - usage
                  - timing_ms
                title: JevResponse
                type: object
        4XX:
          description: >-
            Client error. On a 422, `error.details` lists each field that
            failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        5XX:
          description: Server error. A 503 names what is not running on this server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    JevRequest:
      properties:
        model:
          type: string
          maxLength: 128
          minLength: 1
          title: Model
        state:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - items: {}
              type: array
          title: State
        questions:
          additionalProperties:
            $ref: '#/components/schemas/JevQuestion'
          type: object
          maxProperties: 64
          minProperties: 1
          title: Questions
      additionalProperties: false
      type: object
      required:
        - model
        - state
        - questions
      title: JevRequest
    JevBoolean:
      properties:
        type:
          type: string
          const: noul
          title: Type
        noul:
          type: number
          title: Noul
      type: object
      required:
        - type
        - noul
      title: JevBoolean
    JevChoice:
      properties:
        type:
          type: string
          const: choice
          title: Type
        choice:
          type: string
          title: Choice
        probabilities:
          additionalProperties:
            type: number
          type: object
          title: Probabilities
        confidence:
          type: number
          title: Confidence
      type: object
      required:
        - type
        - choice
        - probabilities
        - confidence
      title: JevChoice
    JevScore:
      properties:
        type:
          type: string
          const: score
          title: Type
        score:
          type: number
          title: Score
        legend:
          additionalProperties:
            type: string
          type: object
          title: Legend
        probabilities:
          additionalProperties:
            type: number
          type: object
          title: Probabilities
        confidence:
          type: number
          title: Confidence
      type: object
      required:
        - type
        - score
        - legend
        - probabilities
        - confidence
      title: JevScore
    JevUsage:
      properties:
        input_tokens:
          type: integer
          title: Input Tokens
        output_tokens:
          type: integer
          const: 0
          title: Output Tokens
        tokenizer:
          $ref: '#/components/schemas/Tokenizer'
      type: object
      required:
        - input_tokens
        - output_tokens
        - tokenizer
      title: JevUsage
    Timing:
      properties:
        render:
          type: number
          title: Render
        score:
          type: number
          title: Score
        load:
          type: number
          title: Load
      type: object
      required:
        - render
        - score
      title: Timing
    Provenance:
      properties:
        serving_artifact_sha256:
          anyOf:
            - type: string
            - type: 'null'
          title: Serving Artifact Sha256
        serving_master_artifact_sha256:
          anyOf:
            - type: string
            - type: 'null'
          title: Serving Master Artifact Sha256
        serving_execution_artifact_sha256:
          anyOf:
            - type: string
            - type: 'null'
          title: Serving Execution Artifact Sha256
        engine_dtype:
          type: string
          title: Engine Dtype
        engine_quantization:
          anyOf:
            - type: string
            - type: 'null'
          title: Engine Quantization
        base_model:
          type: string
          title: Base Model
        base_revision:
          type: string
          title: Base Revision
        base_id:
          type: string
          title: Base Id
        base_artifact_sha256:
          anyOf:
            - type: string
            - type: 'null'
          title: Base Artifact Sha256
        compute_dtype:
          type: string
          title: Compute Dtype
        adapter:
          anyOf:
            - type: string
            - type: 'null'
          title: Adapter
        weights_sha256:
          anyOf:
            - type: string
            - type: 'null'
          title: Weights Sha256
        adapter_bundle_sha256:
          anyOf:
            - type: string
            - type: 'null'
          title: Adapter Bundle Sha256
        artifact_sha256:
          anyOf:
            - type: string
            - type: 'null'
          title: Artifact Sha256
        probabilities:
          type: string
          const: conditional_on_declared_outcomes
          title: Probabilities
        calibration:
          type: string
          const: not_established
          title: Calibration
        compatibility_confidence:
          type: string
          title: Compatibility Confidence
      type: object
      title: Provenance
    Fallback:
      properties:
        from:
          type: string
          title: From
        to:
          type: string
          title: To
        reason:
          type: string
          title: Reason
      type: object
      required:
        - from
        - to
        - reason
      title: Fallback
    Charge:
      properties:
        currency:
          type: string
          const: USD
          title: Currency
        amount_usd:
          type: string
          title: Amount Usd
        reserved_usd:
          type: string
          title: Reserved Usd
        operation_id:
          type: string
          title: Operation Id
      type: object
      required:
        - currency
        - amount_usd
        - reserved_usd
        - operation_id
      title: Charge
    ErrorResponse:
      description: >-
        The body of every error. app.failure() builds it; this model documents
        it.
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      required:
        - error
      title: ErrorResponse
      type: object
    JevQuestion:
      properties:
        type:
          type: string
          enum:
            - noul
            - choice
            - score
          title: Type
        instructions:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - items: {}
              type: array
          title: Instructions
        criteria:
          title: Criteria
      additionalProperties: false
      type: object
      required:
        - type
        - instructions
      title: JevQuestion
    Tokenizer:
      properties:
        name:
          type: string
          title: Name
        revision:
          type: string
          title: Revision
      type: object
      required:
        - name
        - revision
      title: Tokenizer
    ErrorBody:
      properties:
        code:
          description: A stable code to branch on, such as invalid_request.
          title: Code
          type: string
        message:
          description: What went wrong and what to change, in plain words.
          title: Message
          type: string
        retryable:
          description: >-
            True when another attempt may succeed; it does not prove that no
            work was done. Respect Retry-After when present. Only operations
            that support Idempotency-Key replay a prior result, including
            /v1/decide for 24 hours.
          title: Retryable
          type: boolean
        request_id:
          description: Also sent as X-Request-ID. Quote it in bug reports.
          title: Request Id
          type: string
        details:
          anyOf:
            - items:
                $ref: '#/components/schemas/ErrorDetail'
              type: array
            - type: 'null'
          default: null
          description: On validation errors, one entry for each field that failed.
          title: Details
      required:
        - code
        - message
        - retryable
        - request_id
      title: ErrorBody
      type: object
    ErrorDetail:
      properties:
        path:
          description: Where the problem is, such as ["body", "decisions", 0, "outcomes"].
          items:
            anyOf:
              - type: string
              - type: integer
          title: Path
          type: array
        message:
          title: Message
          type: string
        type:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Type
      required:
        - path
        - message
      title: ErrorDetail
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: d1_sk_...
      description: Create an API key in the console. Required when accounts are enabled.

````