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

# Create a decision

> Evaluate named questions against a shared state with Mercury Decide. Supports binary probability (`noul`), categorical choice, and ordinal score questions. Returns answers and token usage. Streaming is not supported.



## OpenAPI

````yaml https://api.inceptionlabs.ai/openapi.json post /v1/decisions
openapi: 3.1.0
info:
  title: Inception API
  version: 1.0.0
  description: >-
    Inception Labs LLM API — chat, FIM, and edit completions powered by Mercury
    diffusion language models. OpenAI-compatible request/response shapes with
    extensions for diffusion-specific features.
  contact:
    name: Inception Labs
    url: https://docs.inceptionlabs.ai
    email: support@inceptionlabs.ai
  license:
    name: Proprietary
  x-logo:
    url: https://docs.inceptionlabs.ai/logo.png
servers:
  - url: https://api.inceptionlabs.ai
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Decisions
    description: Structured decisions with Mercury Decide.
  - name: Chat
    description: Chat completion endpoints (OpenAI-compatible).
  - name: FIM
    description: Fill-in-the-middle code completion endpoints.
  - name: Edit
    description: Code edit completion endpoints.
  - name: Models
    description: List available models.
paths:
  /v1/decisions:
    post:
      tags:
        - Decisions
      summary: Create a decision
      description: >-
        Evaluate named questions against a shared state with Mercury Decide.
        Supports binary probability (`noul`), categorical choice, and ordinal
        score questions. Returns answers and token usage. Streaming is not
        supported.
      operationId: createDecision
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecisionRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecisionResponse'
        '401':
          description: Unauthorized — missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Payment Required — billing inactive or quota exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found — model not available for this account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: Payload Too Large — decision request body exceeds the size limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            Unprocessable Entity — invalid decision request or upstream
            rejection.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/HTTPValidationError'
                  - $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too Many Requests — rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: Bad Gateway — invalid response from the decision service.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service Unavailable — decision service is unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '504':
          description: Gateway Timeout — decision service timed out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    DecisionRequest:
      properties:
        model:
          type: string
          minLength: 1
          title: Model
        state:
          anyOf:
            - type: string
            - additionalProperties:
                $ref: '#/components/schemas/JsonValue'
              type: object
            - items:
                $ref: '#/components/schemas/JsonValue'
              type: array
          title: State
        questions:
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/NoulQuestion'
              - $ref: '#/components/schemas/ChoiceQuestion'
              - $ref: '#/components/schemas/ScoreQuestion'
            discriminator:
              propertyName: type
              mapping:
                choice: '#/components/schemas/ChoiceQuestion'
                noul: '#/components/schemas/NoulQuestion'
                score: '#/components/schemas/ScoreQuestion'
          type: object
          minProperties: 1
          title: Questions
      type: object
      required:
        - model
        - state
        - questions
      title: DecisionRequest
    DecisionResponse:
      properties:
        model:
          type: string
          minLength: 1
          title: Model
        answers:
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/NoulAnswer'
              - $ref: '#/components/schemas/ChoiceAnswer'
              - $ref: '#/components/schemas/ScoreAnswer'
            discriminator:
              propertyName: type
              mapping:
                choice: '#/components/schemas/ChoiceAnswer'
                noul: '#/components/schemas/NoulAnswer'
                score: '#/components/schemas/ScoreAnswer'
          type: object
          minProperties: 1
          title: Answers
        usage:
          $ref: '#/components/schemas/DecisionUsage'
      additionalProperties: false
      type: object
      required:
        - model
        - answers
        - usage
      title: DecisionResponse
    ErrorResponse:
      type: object
      title: ErrorResponse
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
      example:
        error:
          message: >-
            You exceeded the maximum context length for this model of 128000.
            Please reduce the length of the messages or completion.
          type: invalid_request_error
          param: messages
          code: context_length_exceeded
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
      required: []
    JsonValue:
      required: []
    NoulQuestion:
      properties:
        type:
          type: string
          const: noul
          title: Type
        instructions:
          anyOf:
            - type: string
            - additionalProperties:
                $ref: '#/components/schemas/JsonValue'
              type: object
            - items:
                $ref: '#/components/schemas/JsonValue'
              type: array
            - type: 'null'
          title: Instructions
        criteria:
          anyOf:
            - $ref: '#/components/schemas/NoulCriteria'
            - type: 'null'
      type: object
      required:
        - type
      title: NoulQuestion
    ChoiceQuestion:
      properties:
        type:
          type: string
          const: choice
          title: Type
        instructions:
          anyOf:
            - type: string
            - additionalProperties:
                $ref: '#/components/schemas/JsonValue'
              type: object
            - items:
                $ref: '#/components/schemas/JsonValue'
              type: array
            - type: 'null'
          title: Instructions
        criteria:
          additionalProperties:
            anyOf:
              - type: string
              - additionalProperties:
                  $ref: '#/components/schemas/JsonValue'
                type: object
              - items:
                  $ref: '#/components/schemas/JsonValue'
                type: array
              - type: 'null'
          type: object
          maxProperties: 255
          minProperties: 1
          title: Criteria
      type: object
      required:
        - type
        - criteria
      title: ChoiceQuestion
    ScoreQuestion:
      properties:
        type:
          type: string
          const: score
          title: Type
        instructions:
          anyOf:
            - type: string
            - additionalProperties:
                $ref: '#/components/schemas/JsonValue'
              type: object
            - items:
                $ref: '#/components/schemas/JsonValue'
              type: array
            - type: 'null'
          title: Instructions
        criteria:
          items:
            anyOf:
              - type: string
              - additionalProperties:
                  $ref: '#/components/schemas/JsonValue'
                type: object
              - items:
                  $ref: '#/components/schemas/JsonValue'
                type: array
          type: array
          maxItems: 10
          minItems: 1
          title: Criteria
      type: object
      required:
        - type
        - criteria
      title: ScoreQuestion
    NoulAnswer:
      properties:
        type:
          type: string
          const: noul
          title: Type
        noul:
          type: number
          maximum: 1
          minimum: 0
          title: Noul
      additionalProperties: false
      type: object
      required:
        - type
        - noul
      title: NoulAnswer
    ChoiceAnswer:
      properties:
        type:
          type: string
          const: choice
          title: Type
        choice:
          type: string
          title: Choice
        probabilities:
          additionalProperties:
            type: number
            maximum: 1
            minimum: 0
          type: object
          title: Probabilities
        confidence:
          type: number
          maximum: 1
          minimum: 0
          title: Confidence
      additionalProperties: false
      type: object
      required:
        - type
        - choice
        - probabilities
        - confidence
      title: ChoiceAnswer
    ScoreAnswer:
      properties:
        type:
          type: string
          const: score
          title: Type
        score:
          type: number
          minimum: 0
          title: Score
        legend:
          additionalProperties:
            anyOf:
              - type: string
              - additionalProperties:
                  $ref: '#/components/schemas/JsonValue'
                type: object
              - items:
                  $ref: '#/components/schemas/JsonValue'
                type: array
          type: object
          title: Legend
        probabilities:
          additionalProperties:
            type: number
            maximum: 1
            minimum: 0
          type: object
          title: Probabilities
        confidence:
          type: number
          maximum: 1
          minimum: 0
          title: Confidence
      additionalProperties: false
      type: object
      required:
        - type
        - score
        - legend
        - probabilities
        - confidence
      title: ScoreAnswer
    DecisionUsage:
      properties:
        input_tokens:
          type: integer
          minimum: 0
          title: Input Tokens
        output_tokens:
          type: integer
          minimum: 0
          title: Output Tokens
      additionalProperties: false
      type: object
      required:
        - input_tokens
        - output_tokens
      title: DecisionUsage
    ErrorObject:
      type: object
      title: ErrorObject
      required:
        - message
        - type
      properties:
        message:
          type: string
          description: Human-readable error message.
        type:
          type: string
          description: Error category, e.g. `invalid_request_error`, `rate_limit_error`.
        param:
          type:
            - string
            - 'null'
          description: Offending parameter, if applicable.
        code:
          type:
            - string
            - 'null'
          description: Machine-readable error code.
    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:
                $ref: '#/components/schemas/JsonValue'
              type: object
            - items:
                $ref: '#/components/schemas/JsonValue'
              type: array
            - type: 'null'
          title: 'True'
        'false':
          anyOf:
            - type: string
            - additionalProperties:
                $ref: '#/components/schemas/JsonValue'
              type: object
            - items:
                $ref: '#/components/schemas/JsonValue'
              type: array
            - type: 'null'
          title: 'False'
      type: object
      title: NoulCriteria
      required: []
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key provided as a Bearer token: `Authorization: Bearer <api_key>`.
        Get an API key at https://platform.inceptionlabs.ai.

````

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