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

# Execute Decision Model Completion (TypeSafe API)

> Decision model completions in the TypeSafe API's exact request and response format, so the TypeSafe SDKs work with base_url set to this API. Billed like POST /v1/decision/completions; the charge is in the x-swarms-total-cost header.



## OpenAPI

````yaml https://api.swarms.world/openapi.json post /v1/systemone
openapi: 3.1.0
info:
  title: Swarms API
  description: >-
    Swarms API provides scalable, secure orchestration for multi-agent systems.
    Access robust endpoints for managing agents and swarms, automating
    workflows, and monitoring execution. Requires an API key—see the [API Keys
    page](https://swarms.world/platform/api-keys). Refer to [Swarms API
    Documentation](https://docs.swarms.ai) for guides and details.
  version: 1.0.0
servers:
  - url: https://api.swarms.world
    description: Swarms Production API
security: []
paths:
  /v1/systemone:
    post:
      tags:
        - Decision Models
      summary: Execute Decision Model Completion (TypeSafe API)
      description: >-
        Decision model completions in the TypeSafe API's exact request and
        response format, so the TypeSafe SDKs work with base_url set to this
        API. Billed like POST /v1/decision/completions; the charge is in the
        x-swarms-total-cost header.
      operationId: run_systemone_completions_v1_systemone_post
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SystemOneRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemOneOutput'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SystemOneRequest:
      properties:
        state:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - items: {}
              type: array
          title: State
          description: >-
            The content every question is asked about: text, a JSON object or a
            list.
        questions:
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/ChoiceQuestion'
              - $ref: '#/components/schemas/ScoreQuestion'
              - $ref: '#/components/schemas/NoulQuestion'
            discriminator:
              propertyName: type
              mapping:
                choice: '#/components/schemas/ChoiceQuestion'
                noul: '#/components/schemas/NoulQuestion'
                score: '#/components/schemas/ScoreQuestion'
          type: object
          minProperties: 1
          title: Questions
          description: >-
            Questions keyed by a name you choose. The answers come back under
            the same names.
        model:
          type: string
          title: Model
          description: >-
            Decision model that answers the questions, as in the TypeSafe API.
            GET /v1/decision/models lists the available models and their prices.
      type: object
      required:
        - state
        - questions
        - model
      title: SystemOneRequest
    SystemOneOutput:
      properties:
        model:
          type: string
          title: Model
          description: >-
            The model version that answered, which may differ from an alias such
            as jev-latest.
        answers:
          additionalProperties:
            additionalProperties: true
            type: object
          type: object
          title: Answers
          description: >-
            Answers keyed by question name. A choice answer has choice,
            probabilities and confidence; a score answer has score, legend,
            probabilities and confidence; a noul answer has noul, the
            probability from 0 to 1.
        usage:
          $ref: '#/components/schemas/SystemOneUsage'
          description: >-
            Token counts for this request. The amount charged is in the
            x-swarms-total-cost header.
      type: object
      required:
        - model
        - answers
        - usage
      title: SystemOneOutput
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ChoiceQuestion:
      properties:
        type:
          type: string
          const: choice
          title: Type
          description: Picks one of the options in criteria.
        instructions:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: 'null'
          title: Instructions
          description: What the model should decide when choosing an option.
        criteria:
          additionalProperties:
            anyOf:
              - type: string
              - additionalProperties: true
                type: object
              - items: {}
                type: array
              - type: 'null'
          type: object
          title: Criteria
          description: >-
            Option names mapped to a description of when each applies, or null
            to go by the name alone.
      type: object
      required:
        - type
        - criteria
      title: ChoiceQuestion
    ScoreQuestion:
      properties:
        type:
          type: string
          const: score
          title: Type
          description: Rates the state against the levels in criteria.
        instructions:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: 'null'
          title: Instructions
          description: What the model should rate.
        criteria:
          items:
            anyOf:
              - type: string
              - additionalProperties: true
                type: object
              - items: {}
                type: array
          type: array
          minItems: 1
          title: Criteria
          description: >-
            Level descriptions ordered from lowest to highest. Each level's
            position is its score, starting at 0.
      type: object
      required:
        - type
        - criteria
      title: ScoreQuestion
    NoulQuestion:
      properties:
        type:
          type: string
          const: noul
          title: Type
          description: Gives the probability that a yes/no question or statement is true.
        instructions:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: 'null'
          title: Instructions
          description: The yes/no question or statement to evaluate.
        criteria:
          anyOf:
            - $ref: '#/components/schemas/NoulCriteria'
            - type: 'null'
          description: What counts as a yes and as a no answer.
      type: object
      required:
        - type
      title: NoulQuestion
    SystemOneUsage:
      properties:
        input_tokens:
          type: integer
          title: Input Tokens
          description: Input tokens reported by the provider.
        output_tokens:
          type: integer
          title: Output Tokens
          description: Output tokens reported by the provider.
      type: object
      required:
        - input_tokens
        - output_tokens
      title: SystemOneUsage
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    NoulCriteria:
      properties:
        'true':
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: 'null'
          title: 'True'
          description: What counts as a yes answer.
        'false':
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: 'null'
          title: 'False'
          description: What counts as a no answer.
      additionalProperties: false
      type: object
      title: NoulCriteria

````

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