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

# Get AI credentials proxy

> Read the AI credentials proxy switch and its price.



## OpenAPI

````yaml openapi/boat-v1.yaml GET /ai-proxy
openapi: 3.1.0
info:
  title: Boat Public API v1
  version: 1.0.0
  description: >
    Public JSON API for creating, operating, prompting, observing, and exposing
    sandboxes from backend services, CI jobs, hosted workers, and Boat
    automation products.


    The v1 reference intentionally documents the developer integration surface
    only. Dashboard billing actions are not part of v1.
servers:
  - url: https://boat.dev/api/v1
security:
  - BoatBearerAuth: []
tags:
  - name: Boat
    description: >-
      Unified Boat account, setup, lifecycle, prompting, event history, desktop
      access, and SSH operations.
paths:
  /ai-proxy:
    get:
      tags:
        - Boat
      summary: Get AI credentials proxy
      description: >-
        Returns the AI credentials proxy switch of the account in scope, a
        person or an organization, with its price. Needs an API key with
        `account.admin`.
      operationId: getAiProxy
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/OrgHeader'
      responses:
        '200':
          description: The switch and its price.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiProxySettings'
              examples:
                'on':
                  value:
                    ok: true
                    type: ai_proxy.info
                    success: true
                    accountId: usr_123
                    org: false
                    enabled: true
                    enabledAt: '2026-10-09T08:00:00Z'
                    pricing:
                      dailyDollars: 1
                      dollarsPer1000Requests: 1
                    proxyUrl: https://boat.dev/api/aiproxy
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    OrgId:
      name: org
      in: query
      required: false
      schema:
        type: string
      description: >-
        Billing wallet for this request: an organization you belong to, by id
        (`team_…`) or by name as `GET /orgs` lists it (case-insensitive), or
        `personal`. Omitted, the account's active wallet applies (`PATCH
        /orgs/active`; personal until set). Two organizations sharing the name
        answer `409 ambiguous_org` and need the id. Sandboxes and snapshots stay
        creator-private. On `/environments` routes, only this query parameter
        selects the organization's shared environments; the `X-Boat-Org` header
        and the active wallet do not apply there. Members read them, owners and
        admins change them.
    OrgHeader:
      name: X-Boat-Org
      in: header
      required: false
      schema:
        type: string
      description: Same as the `org` query parameter. Query wins when both are set.
  schemas:
    AiProxySettings:
      allOf:
        - $ref: '#/components/schemas/SuccessBase'
        - type: object
          required:
            - success
            - accountId
            - org
            - enabled
            - enabledAt
            - pricing
            - proxyUrl
          properties:
            success:
              type: boolean
            accountId:
              type: string
              description: The account the switch belongs to, a person or an organization.
            org:
              type: boolean
              description: True when `accountId` is an organization.
            enabled:
              type: boolean
            enabledAt:
              type:
                - string
                - 'null'
              format: date-time
            pricing:
              type: object
              required:
                - dailyDollars
                - dollarsPer1000Requests
              properties:
                dailyDollars:
                  type: number
                  examples:
                    - 1
                  description: Charged to the account for each UTC day the proxy is on.
                dollarsPer1000Requests:
                  type: number
                  examples:
                    - 1
                  description: Charged per 1,000 proxied requests.
            proxyUrl:
              type: string
              format: uri
              description: The base URL sandboxes call instead of the providers.
    SuccessBase:
      type: object
      required:
        - ok
        - type
      properties:
        ok:
          type: boolean
          examples:
            - true
        type:
          type: string
          description: Stable success envelope discriminator added by v1.
    ErrorEnvelope:
      type: object
      required:
        - ok
        - type
        - status
        - code
        - message
        - error
        - requestId
      properties:
        ok:
          type: boolean
          examples:
            - false
        type:
          type: string
          examples:
            - sandbox.error
        status:
          type: integer
          examples:
            - 409
        code:
          type: string
          examples:
            - provider_not_configured
        message:
          type: string
          examples:
            - Prompting is locked until Codex is configured on the Agents page.
        requestId:
          type: string
          examples:
            - req_01HX...
        error:
          type: object
          required:
            - code
            - message
            - status
          properties:
            code:
              type: string
            message:
              type: string
            status:
              type: integer
            details:
              type: object
              additionalProperties: true
  responses:
    Unauthorized:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            unauthorized:
              value:
                ok: false
                type: sandbox.error
                status: 401
                code: unauthorized
                message: Unauthorized
                error:
                  code: unauthorized
                  message: Unauthorized
                  status: 401
                requestId: req_01HX...
  securitySchemes:
    BoatBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sandbox_api_key
      description: >-
        Boat bearer token in the form `boat_...`. Service API keys authenticate
        sandbox operations.

````

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