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

# Create a reusable choice catalogue.

> Creates a named catalog that can be referenced by ID from future decision requests. Catalog IDs are unique within the caller's namespace. Catalog writes require a bearer API key.



## OpenAPI

````yaml /openapi.json post /v1/catalogs
openapi: 3.1.0
info:
  title: Aspas Labs API
  version: 1.0.0
  description: >-
    A small, direct API for structured decisions with Goldenfish. The free
    decision and model discovery surface does not require an API key. Send
    context, an instruction, and either inline choices or a reusable catalog.
    The response returns one selected choice, confidence, probabilities, the
    model used, and input-token usage. The model is selected in the request body
    so the public contract stays stable as the model catalog grows. Catalog
    management is a separate protected surface and requires a bearer key.
  contact:
    name: Aspas Labs
    url: https://aspaslabs.com/
    email: hello@aspaslabs.com
  license:
    name: Aspas Labs API terms
    url: https://aspaslabs.com/
servers:
  - url: https://api.aspaslabs.com
    description: Production
security: []
tags:
  - name: Decisions
    description: >-
      Run a constrained inference request and receive a typed choice with
      confidence and per-choice probabilities.
  - name: Models
    description: >-
      Discover model identifiers, availability status, and public input and
      choice limits.
  - name: Catalogs
    description: Create and manage named choice catalogs for repeatable decision workflows.
  - name: Health
    description: >-
      Check process liveness and whether an inference worker is ready to serve
      requests.
paths:
  /v1/catalogs:
    post:
      tags:
        - Catalogs
      summary: Create a reusable choice catalogue.
      description: >-
        Creates a named catalog that can be referenced by ID from future
        decision requests. Catalog IDs are unique within the caller's namespace.
        Catalog writes require a bearer API key.
      operationId: createCatalog
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CatalogCreate'
      responses:
        '201':
          description: Catalogue created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog'
        '400':
          $ref: '#/components/responses/InvalidRequest'
        '401':
          $ref: '#/components/responses/AuthenticationRequired'
      security:
        - apiKey: []
components:
  schemas:
    CatalogCreate:
      type: object
      description: The definition for a reusable choice catalog.
      additionalProperties: false
      required:
        - id
        - model
        - choices
      properties:
        id:
          type: string
          description: >-
            A unique catalog ID containing 1–128 letters, numbers, `.`, `_`, or
            `-`.
          pattern: ^[A-Za-z0-9._-]{1,128}$
          example: support-actions
        model:
          type: string
          description: The model used when this catalog is referenced by a decision.
          example: goldenfish-g1
        choices:
          type: array
          description: The 2–300 unique, non-empty outcomes accepted by this catalog.
          minItems: 2
          maxItems: 300
          uniqueItems: true
          items:
            type: string
            minLength: 1
        version:
          type: string
          description: An application-defined version label for change tracking.
          example: '20261011.120000'
        visibility:
          type: string
          description: >-
            Whether the catalog is private to the caller or public in the
            deployment.
          enum:
            - private
            - public
          default: private
    Catalog:
      type: object
      description: A reusable choice catalog returned by the catalog endpoints.
      required:
        - id
        - object
        - model
        - choices
        - visibility
      properties:
        id:
          type: string
          description: The catalog identifier used in decision requests.
          example: support-actions
        object:
          const: catalog
          description: Always `catalog` for this response object.
        model:
          type: string
          description: The model associated with the catalog.
          example: goldenfish-g1
        choices:
          type: array
          description: The catalog's current valid outcomes.
          items:
            type: string
        version:
          type: string
          description: The version label supplied when the catalog was created.
        visibility:
          type: string
          description: The catalog's visibility in the deployment.
          enum:
            - private
            - public
    ErrorResponse:
      type: object
      description: The common error envelope returned for failed requests.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
            - code
          properties:
            message:
              type: string
              description: >-
                A human-readable explanation intended for logs and operator
                feedback.
              example: Rate limit exceeded.
            type:
              type: string
              description: The broad error category for program logic.
              enum:
                - invalid_request_error
                - authentication_error
                - rate_limit_error
                - model_error
                - server_error
            code:
              type: string
              description: A machine-readable reason for the failure.
              example: rate_limit_exceeded
            param:
              type:
                - string
                - 'null'
              description: The request parameter associated with the error, or `null`.
              example: null
  responses:
    InvalidRequest:
      description: >-
        The request is invalid. Check required fields, JSON types, and the rule
        that exactly one of `choices` or `catalog` must be provided.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    AuthenticationRequired:
      description: >-
        Authentication is required or the supplied bearer key is invalid. Add a
        server-side `Authorization: Bearer gf_live_...` header when the endpoint
        requires one.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: gf_live_...
      description: >-
        Use a bearer key beginning with `gf_live_...` for protected catalog
        operations. Keep keys server-side. Aspas Labs does not currently expose
        a self-service dashboard or key-management page.

````

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