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

# Answer typed questions about an input (Google Decisions)

> Mirrors Google's native `POST /v1beta/decisions` exactly, so the official google-genai SDKs work by pointing their base URL at this API (authenticate with `x-goog-api-key` or a bearer key). Send an `input` (text, or Interactions-style content blocks: text, image, audio, video, PDF) plus a map of typed `questions` (noul, choice, score) keyed by id, and receive one typed answer per question with probabilities and confidence. Requires google/gemini-decision-1; other models return 400. Billed on `usage.total_input_tokens` only ($0.10/M); output tokens are never billed. Google's own validation errors are returned as 400.



## OpenAPI

````yaml /openapi.yaml post /v1beta/decisions
openapi: 3.1.0
info:
  title: Impossibl AI API
  version: 0.0.1
  description: >
    The Impossibl AI API is one API for all AI providers, OpenAI-compatible
    across OpenAI,

    Anthropic, Google, xAI, and more (`GET /v1/models` lists the full catalog),

    billed from a prepaid credit balance.


    Usage is billed at the model rates published by GET /v1/models with no usage
    markup.

    Prepaid credit purchases charge a separate fixed 5% platform fee before tax.


    **Get started**

    Create a workspace key at https://impossibl.com/dashboard, then call a model
    with

    `Authorization: Bearer <key>` and a full model ID from `GET /v1/models`.

    The walkthrough is at https://impossibl.com/docs/quickstart.


    Agents can create a funded account and initial key with `POST /v1/accounts`.

    The current API continues to use `/v1`; there is no `/v2` base URL.

    Conversation history is managed by your application. Provider-specific SDK

    endpoints and fields outside this specification are not guaranteed
    compatible.
servers:
  - url: https://api.impossibl.com
    description: Production
  - url: http://localhost:8787
    description: Local dev
security:
  - BearerKey: []
paths:
  /v1beta/decisions:
    post:
      summary: Answer typed questions about an input (Google Decisions)
      description: >-
        Mirrors Google's native `POST /v1beta/decisions` exactly, so the
        official google-genai SDKs work by pointing their base URL at this API
        (authenticate with `x-goog-api-key` or a bearer key). Send an `input`
        (text, or Interactions-style content blocks: text, image, audio, video,
        PDF) plus a map of typed `questions` (noul, choice, score) keyed by id,
        and receive one typed answer per question with probabilities and
        confidence. Requires google/gemini-decision-1; other models return 400.
        Billed on `usage.total_input_tokens` only ($0.10/M); output tokens are
        never billed. Google's own validation errors are returned as 400.
      operationId: createGoogleDecision
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GoogleDecisionsRequest'
      responses:
        '200':
          description: >-
            One answer per question, keyed by the question's id, plus token
            usage.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleDecisionsResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/InsufficientCredits'
        '404':
          $ref: '#/components/responses/UnknownModel'
        '502':
          $ref: '#/components/responses/UpstreamError'
        '503':
          $ref: '#/components/responses/ProviderNotConfigured'
components:
  schemas:
    GoogleDecisionsRequest:
      type: object
      required:
        - model
        - input
        - questions
      properties:
        model:
          type: string
          example: google/gemini-decision-1
        input:
          description: >-
            Text, or Interactions-style content blocks (`{type:
            text|image|audio|video, ...}`) evaluated by every question.
          oneOf:
            - type: string
            - type: array
              items:
                type: object
        questions:
          type: object
          minProperties: 1
          description: >-
            Caller-named question ids; each answer comes back under the same
            key. Up to 1,000 questions per request.
          additionalProperties:
            type: object
            required:
              - type
              - instructions
            properties:
              type:
                type: string
                enum:
                  - noul
                  - choice
                  - score
              instructions:
                type: string
              criteria:
                description: >-
                  Required for `choice` (an object of option -> description, 2
                  to 255 options) and `score` (an ordered array of level
                  descriptions, lowest first). Not accepted by `noul`.
                oneOf:
                  - type: object
                    additionalProperties:
                      type: string
                  - type: array
                    minItems: 2
                    items:
                      type: string
    GoogleDecisionsResponse:
      type: object
      required:
        - answers
        - usage
      properties:
        answers:
          type: object
          description: >-
            `noul` carries `noul` (probability of yes) and `confidence`.
            `choice` carries `choice`, `confidence` and `probabilities` {option:
            probability}. `score` carries `score` (probability-weighted 0-based
            level), `confidence`, `legend` and `probabilities` {level index:
            probability}.
          additionalProperties:
            type: object
            required:
              - type
            properties:
              type:
                type: string
                enum:
                  - noul
                  - choice
                  - score
              noul:
                type: number
                minimum: 0
                maximum: 1
              choice:
                type: string
              score:
                type: number
              confidence:
                type: number
                minimum: 0
                maximum: 1
              legend:
                type: object
                additionalProperties:
                  type: string
              probabilities:
                type: object
                additionalProperties:
                  type: number
        usage:
          type: object
          required:
            - total_input_tokens
            - total_output_tokens
          properties:
            total_tokens:
              type: integer
            total_input_tokens:
              type: integer
            total_output_tokens:
              type: integer
              description: Always 0; output is not billed.
            input_tokens_by_modality:
              type: array
              items:
                type: object
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              description: >-
                Common types include authentication_error,
                invalid_request_error, insufficient_quota, billing_required,
                permission_error, upstream_error, and provider_not_configured.
  responses:
    BadRequest:
      description: Malformed request (bad JSON, or missing required fields).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: '`model` and `messages` are required'
              type: invalid_request_error
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: Invalid API key
              type: authentication_error
    InsufficientCredits:
      description: >-
        Available credits or postpaid headroom cannot cover the request's
        balance check, which can include estimated input cost. Top up or reduce
        the request size.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: Insufficient credits. Top up to continue.
              type: insufficient_quota
    UnknownModel:
      description: The requested `model` id is not in the registry (see GET /v1/models).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: 'Unknown model: foo/bar'
              type: invalid_request_error
    UpstreamError:
      description: The upstream provider returned an error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: 'permission-denied: ...'
              type: upstream_error
    ProviderNotConfigured:
      description: The provider for this model has no API key configured on the gateway.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              message: 'Provider not configured: missing OPENAI_API_KEY'
              type: provider_not_configured
  securitySchemes:
    BearerKey:
      type: http
      scheme: bearer
      description: Gateway API key (`imp-rt-...`) from POST /v1/accounts or /v1/keys.

````

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