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

# Create Decisions

> TypeSafe-compatible System One decisions endpoint.



## OpenAPI

````yaml https://api.edenai.run/v3/docs/openapi.json post /v3/alpha/decisions
openapi: 3.1.0
info:
  title: Eden AI API V3
  version: 3.0.0
servers:
  - url: https://api.edenai.run
    description: Production server
security: []
paths:
  /v3/alpha/decisions:
    post:
      tags:
        - Decisions
      summary: Create Decisions
      description: TypeSafe-compatible System One decisions endpoint.
      operationId: create_decisions_v3_alpha_decisions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecisionsBody'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecisionsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - AuthBearer: []
components:
  schemas:
    DecisionsBody:
      properties:
        tags:
          title: Tags
          description: >-
            Up to 10 key/value labels recorded with this call, for filtering and
            grouping usage. Merged with the `X-EdenAI-Tags` header.
          examples:
            - client: acme
              project: invoices
        state:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - items: {}
              type: array
          title: State
          description: >-
            The content to decide about: a plain string, or a JSON object /
            array of related context.
        questions:
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/NoulQuestion'
              - $ref: '#/components/schemas/ChoiceQuestion'
              - $ref: '#/components/schemas/ScoreQuestion'
            discriminator:
              propertyName: type
              mapping:
                choice:
                  $ref: '#/components/schemas/ChoiceQuestion'
                noul:
                  $ref: '#/components/schemas/NoulQuestion'
                score:
                  $ref: '#/components/schemas/ScoreQuestion'
          type: object
          minProperties: 1
          title: Questions
          description: >-
            Typed questions keyed by name: `noul` (yes/no probability), `choice`
            (one of the `criteria` keys) or `score` (position on the ordered
            `criteria` rubric).
        model:
          type: string
          title: Model
          description: >-
            Model identifier in 'provider/model' format, e.g.
            'typesafe/jev-latest'.
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
          description: Arbitrary metadata attached to the request.
        extra_headers:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Extra Headers
          description: Additional HTTP headers forwarded to the provider API.
        extra_body:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Extra Body
          description: Additional body fields forwarded to the provider API.
      additionalProperties: true
      type: object
      required:
        - state
        - questions
        - model
      title: DecisionsBody
      description: >-
        TypeSafe's ``POST /v1/systemone`` request body, plus minimal Eden
        extensions.


        Unknown top-level fields are forwarded to the provider
        (``extra="allow"`` via the base

        mixin, which also rejects connection keys).
    DecisionsResponse:
      properties:
        cost:
          anyOf:
            - type: number
            - type: 'null'
          title: Cost
        provider:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
          description: TypeSafe request id (x-typesafe-request-id).
        model:
          type: string
          title: Model
        answers:
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/NoulAnswer'
              - $ref: '#/components/schemas/ChoiceAnswer'
              - $ref: '#/components/schemas/ScoreAnswer'
            discriminator:
              propertyName: type
              mapping:
                choice:
                  $ref: '#/components/schemas/ChoiceAnswer'
                noul:
                  $ref: '#/components/schemas/NoulAnswer'
                score:
                  $ref: '#/components/schemas/ScoreAnswer'
          type: object
          title: Answers
        usage:
          $ref: '#/components/schemas/DecisionUsage'
      additionalProperties: true
      type: object
      required:
        - model
        - answers
        - usage
      title: DecisionsResponse
      description: >-
        TypeSafe's response (typed answers, usage, request id) + Eden `cost` and
        `provider`.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    NoulQuestion:
      properties:
        instructions:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: 'null'
          title: Instructions
        type:
          type: string
          const: noul
          title: Type
        criteria:
          anyOf:
            - additionalProperties:
                anyOf:
                  - type: string
                  - additionalProperties: true
                    type: object
                  - items: {}
                    type: array
                  - type: 'null'
              type: object
            - type: 'null'
          title: Criteria
      additionalProperties: true
      type: object
      required:
        - type
      title: NoulQuestion
      description: >-
        Yes/no question, answered as a probability; ``criteria`` may describe
        the ``true``

        and ``false`` outcomes.
    ChoiceQuestion:
      properties:
        instructions:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: 'null'
          title: Instructions
        type:
          type: string
          const: choice
          title: Type
        criteria:
          additionalProperties:
            anyOf:
              - type: string
              - additionalProperties: true
                type: object
              - items: {}
                type: array
              - type: 'null'
          type: object
          title: Criteria
      additionalProperties: true
      type: object
      required:
        - type
        - criteria
      title: ChoiceQuestion
      description: >-
        One-of-N selection; ``criteria`` maps each option label to its
        description.
    ScoreQuestion:
      properties:
        instructions:
          anyOf:
            - type: string
            - additionalProperties: true
              type: object
            - items: {}
              type: array
            - type: 'null'
          title: Instructions
        type:
          type: string
          const: score
          title: Type
        criteria:
          items:
            anyOf:
              - type: string
              - additionalProperties: true
                type: object
              - items: {}
                type: array
          type: array
          title: Criteria
      additionalProperties: true
      type: object
      required:
        - type
        - criteria
      title: ScoreQuestion
      description: Ordered rubric; ``criteria[i]`` describes score level ``i``.
    NoulAnswer:
      properties:
        type:
          type: string
          const: noul
          title: Type
        noul:
          type: number
          title: Noul
      additionalProperties: true
      type: object
      required:
        - type
        - noul
      title: NoulAnswer
    ChoiceAnswer:
      properties:
        type:
          type: string
          const: choice
          title: Type
        choice:
          type: string
          title: Choice
        confidence:
          type: number
          title: Confidence
        probabilities:
          additionalProperties:
            type: number
          type: object
          title: Probabilities
      additionalProperties: true
      type: object
      required:
        - type
        - choice
        - confidence
        - probabilities
      title: ChoiceAnswer
    ScoreAnswer:
      properties:
        type:
          type: string
          const: score
          title: Type
        score:
          type: number
          title: Score
        confidence:
          type: number
          title: Confidence
        legend:
          additionalProperties:
            anyOf:
              - type: string
              - additionalProperties: true
                type: object
              - items: {}
                type: array
          type: object
          title: Legend
        probabilities:
          additionalProperties:
            type: number
          type: object
          title: Probabilities
      additionalProperties: true
      type: object
      required:
        - type
        - score
        - confidence
        - legend
        - probabilities
      title: ScoreAnswer
    DecisionUsage:
      properties:
        input_tokens:
          type: integer
          title: Input Tokens
          default: 0
        output_tokens:
          type: integer
          title: Output Tokens
          default: 0
      additionalProperties: true
      type: object
      title: DecisionUsage
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    AuthBearer:
      type: http
      scheme: bearer

````