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

# Billing-Modus abrufen

> Lies Billing-Modus und Währung des Workspace, bevor du andere Routen der Billing API aufrufst

Starte mit der Modusabfrage und rufe danach nur die Routen dieses Modus auf. Der andere Modus antwortet mit `409`, `code` `BILLING_MODE_MISMATCH` und dem Workspace-Modus in `details.mode`.

## Basis-URL

```
https://api.langdock.com/billing/v1/mode
```

> [!WARNING]
>
> **Dedicated Deployments**
>
> Ersetze `api.langdock.com` durch `<your-deployment-url>/api/public` in allen Anfragen.

## Voraussetzungen

* **API-Schlüssel** mit dem Scope `BILLING_API`
* Der Besitzer ist ein Service Account, der nicht gelöscht ist und eine aktive Admin-Mitgliedschaft hat

## Billing-Modus

```bash theme={null}
curl https://api.langdock.com/billing/v1/mode \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json theme={null}
{ "mode": "bring-your-own-keys", "currency": "USD" }
```

Die Pläne in diesem Modus sind `standard` (**Standard**) und `power_user` (**Power User**). Es gibt keine Seats-Route. Ein Pfad, den es in diesem Modus nicht gibt, zum Beispiel ein Seats-Pfad, gibt `404` zurück.

> [!NOTE]
>
> Langdock blockiert bewusst Browser-basierte Anfragen, um deinen API-Schlüssel zu schützen und die Sicherheit deiner Anwendungen zu gewährleisten. Weitere Informationen findest du in unserem Guide zu [Best Practices für API-Schlüssel](https://docs.langdock.com/de/admin/ai-adoption-and-rollout/best-practices/api-key-best-practices.md).


## OpenAPI

````yaml GET /billing/v1/mode
openapi: 3.0.0
info:
  title: Langdock API
  version: 3.0.0
servers:
  - url: https://api.langdock.com
    description: Production
security:
  - bearerAuth: []
paths:
  /billing/v1/mode:
    get:
      tags:
        - Mode
      summary: Discover the workspace billing mode and currency
      description: >-
        Every Dedicated deployment uses bring-your-own-keys, including
        deployments with managed model keys.
      operationId: getBillingMode
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingMode'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    BillingMode:
      oneOf:
        - type: object
          additionalProperties: false
          required:
            - mode
            - currency
          properties:
            mode:
              type: string
              enum:
                - ai-models-included
            currency:
              type: string
              enum:
                - EUR
        - type: object
          additionalProperties: false
          required:
            - mode
            - currency
          properties:
            mode:
              type: string
              enum:
                - bring-your-own-keys
            currency:
              type: string
              enum:
                - USD
    Error:
      type: object
      additionalProperties: false
      required:
        - message
        - code
      properties:
        message:
          type: string
        code:
          type: string
        details:
          type: object
          additionalProperties: true
          description: >-
            Optional structured details specific to the error code, such as
            userIds for invalid bulk members.
  responses:
    BadRequest:
      description: >-
        Invalid body/query, unknown fields, empty PATCH, invalid limit, invalid
        bulk member IDs, or a cursor outside this workspace (INVALID_CURSOR).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid authentication.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        Missing Billing scope, personal key, unavailable feature, missing active
        service-account Admin authority, or email filter without the
        USER_MANAGEMENT_API scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: >-
        Resource not in this workspace, inactive/non-human user, privacy-hidden
        agent, usage request not found for that member, or endpoint unavailable
        in this mode.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    MethodNotAllowed:
      description: Unsupported HTTP method.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: API rate limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key as Bearer token. Format "Bearer YOUR_API_KEY"

````

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