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

# Get billing subscription

> Reads the org's subscription: its tier and warm slot limit, payment state, the channel that manages it and when it cancels, its credits and billing cycle, its plan with the members who occupy its seats, and each billing action's availability for the caller on the requesting surface.

Use this tool when you need to:
- Check the org's tier, credits_remaining and payment_state, such as after a task start was refused with 402 credits_exhausted or billing_blocked
- Decide whether the caller can subscribe, change plan, manage the subscription, see billing history, or buy a credit pack or an inference top-up from this surface
- Read warm_slot_limit before assigning warm slots

Examples:
- GET /orgs/{orgID}/billing/subscription?surface=web

Hints:
- orgID is the org's uuid; surface is required, web, ios or android (422 from the schema when missing or any other value); the actions are the ones available from that surface.
- Carries tier (free, starter, pro, max or team), warm_slot_limit, payment_state (not_required, checkout_pending, active, grace_period, past_due, unpaid, canceled or blocked), managed_by (none, stripe, app_store or play_store), cancels_at (null while it renews), credits_remaining, monthly_credit_grant, settlement_mode (prepaid or enterprise_invoice), current_period_start and current_period_end, active_billing_cycle_id, billing_cycle_starts_at and billing_cycle_ends_at, and plan with kind, allowed_tiers, seat_count and seats.
- actions holds subscribe, change_plan, manage_subscription, view_billing_history, buy_credit_pack and buy_inference_topup, each a union on state: available with via (stripe_checkout, stripe_portal, store_purchase or store_customer_center), or the reason it is not, such as managed_elsewhere, subscription_active, free_tier or payment_delinquent. A caller who is not an owner, admin or billing member reads every action as requires_org_admin.
- On ios and android, store_app_user_id is the caller's store identity once their first store purchase intent minted it; the read never mints it.
- Use createBillingCheckoutSession or createBillingPortalSession instead to take an available action, getBillingCatalog for prices, and listBillingWarmSlots for the slots themselves.
- Any member of the org may read it, every role included, with a session or a platform API key; 404 for an org without billing, 403 org_membership_required for a non-member, 400 for an orgID that is not a uuid, and 403 agent_host_route_not_allowed for an agent host's grant.



## OpenAPI

````yaml api-reference/openapi.json GET /orgs/{orgID}/billing/subscription
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /orgs/{orgID}/billing/subscription:
    get:
      tags:
        - billing
      summary: Get billing subscription
      description: >-
        Reads the org's subscription: its tier and warm slot limit, payment
        state, the channel that manages it and when it cancels, its credits and
        billing cycle, its plan with the members who occupy its seats, and each
        billing action's availability for the caller on the requesting surface.


        Use this tool when you need to:

        - Check the org's tier, credits_remaining and payment_state, such as
        after a task start was refused with 402 credits_exhausted or
        billing_blocked

        - Decide whether the caller can subscribe, change plan, manage the
        subscription, see billing history, or buy a credit pack or an inference
        top-up from this surface

        - Read warm_slot_limit before assigning warm slots


        Examples:

        - GET /orgs/{orgID}/billing/subscription?surface=web


        Hints:

        - orgID is the org's uuid; surface is required, web, ios or android (422
        from the schema when missing or any other value); the actions are the
        ones available from that surface.

        - Carries tier (free, starter, pro, max or team), warm_slot_limit,
        payment_state (not_required, checkout_pending, active, grace_period,
        past_due, unpaid, canceled or blocked), managed_by (none, stripe,
        app_store or play_store), cancels_at (null while it renews),
        credits_remaining, monthly_credit_grant, settlement_mode (prepaid or
        enterprise_invoice), current_period_start and current_period_end,
        active_billing_cycle_id, billing_cycle_starts_at and
        billing_cycle_ends_at, and plan with kind, allowed_tiers, seat_count and
        seats.

        - actions holds subscribe, change_plan, manage_subscription,
        view_billing_history, buy_credit_pack and buy_inference_topup, each a
        union on state: available with via (stripe_checkout, stripe_portal,
        store_purchase or store_customer_center), or the reason it is not, such
        as managed_elsewhere, subscription_active, free_tier or
        payment_delinquent. A caller who is not an owner, admin or billing
        member reads every action as requires_org_admin.

        - On ios and android, store_app_user_id is the caller's store identity
        once their first store purchase intent minted it; the read never mints
        it.

        - Use createBillingCheckoutSession or createBillingPortalSession instead
        to take an available action, getBillingCatalog for prices, and
        listBillingWarmSlots for the slots themselves.

        - Any member of the org may read it, every role included, with a session
        or a platform API key; 404 for an org without billing, 403
        org_membership_required for a non-member, 400 for an orgID that is not a
        uuid, and 403 agent_host_route_not_allowed for an agent host's grant.
      operationId: getBillingSubscription
      parameters:
        - in: path
          name: orgID
          required: true
          schema:
            format: uuid
            type: string
        - description: >-
            The client asking: web, ios or android. The actions returned are the
            ones available from that surface.
          explode: false
          in: query
          name: surface
          required: true
          schema:
            description: >-
              The client asking: web, ios or android. The actions returned are
              the ones available from that surface.
            enum:
              - web
              - ios
              - android
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingSubscription'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Not Found
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Gone
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingErrorResponse'
          description: Internal Server Error
components:
  schemas:
    BillingSubscription:
      additionalProperties: false
      properties:
        actions:
          $ref: '#/components/schemas/BillingActions'
        active_billing_cycle_id:
          format: uuid
          type: string
        billing_cycle_ends_at:
          format: date-time
          type: string
        billing_cycle_starts_at:
          format: date-time
          type: string
        cancels_at:
          description: >-
            When the subscription ends, having been cancelled at the end of its
            period; null while it renews.
          format: date-time
          type:
            - string
            - 'null'
        credits_remaining:
          format: double
          type: number
        current_period_end:
          format: date-time
          type: string
        current_period_start:
          format: date-time
          type: string
        managed_by:
          description: >-
            The channel that manages the subscription: none while the org has no
            paid subscription.
          enum:
            - none
            - stripe
            - app_store
            - play_store
          type: string
        monthly_credit_grant:
          format: int64
          type: integer
        payment_state:
          enum:
            - not_required
            - checkout_pending
            - active
            - grace_period
            - past_due
            - unpaid
            - canceled
            - blocked
          type: string
        plan:
          $ref: '#/components/schemas/BillingSubscriptionPlan'
        settlement_mode:
          enum:
            - prepaid
            - enterprise_invoice
          type: string
        store_app_user_id:
          description: >-
            On ios and android, the signed-in user's store identity, which the
            store SDK logs in with. Absent until the user's first store purchase
            intent mints it, and on the web.
          format: uuid
          type: string
        tier:
          enum:
            - free
            - starter
            - pro
            - max
            - team
          type: string
        warm_slot_limit:
          description: >-
            The warm slots the org may assign: its tier's, or on Team the cap
            its occupied seats set.
          format: int64
          minimum: 0
          type: integer
      required:
        - plan
        - settlement_mode
        - tier
        - warm_slot_limit
        - monthly_credit_grant
        - credits_remaining
        - payment_state
        - cancels_at
        - active_billing_cycle_id
        - billing_cycle_starts_at
        - managed_by
        - actions
      type: object
    BillingErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - bad_gateway
            - bad_request
            - checkout_pending
            - cli_upgrade_required
            - client_outdated
            - conflict
            - enterprise_invoice
            - forbidden
            - free_tier
            - gateway_timeout
            - gone
            - internal_error
            - invalid_surface
            - managed_elsewhere
            - method_not_allowed
            - no_billing_history
            - not_acceptable
            - not_found
            - not_implemented
            - payment_delinquent
            - payment_required
            - personal_org_requires_personal_plan
            - precondition_failed
            - provider_unavailable
            - rate_limited
            - request_canceled
            - request_timeout
            - request_too_large
            - requires_org_admin
            - service_unavailable
            - subscription_active
            - subscription_pending
            - team_org_requires_team_plan
            - team_plan_web_only
            - team_seats_via_membership
            - unauthenticated
            - unsupported_media_type
            - validation_failed
            - warm_slot_occupied
            - web_only
          minLength: 1
          type: string
        error:
          minLength: 1
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
      required:
        - error
        - code
      type: object
    OrgAuthorizationErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - org_membership_required
            - org_role_insufficient
            - org_suspended
            - account_deleting
            - agent_host_route_not_allowed
            - credential_kind_not_admitted
            - grant_scope_insufficient
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    BillingActions:
      additionalProperties: false
      properties:
        buy_credit_pack:
          $ref: '#/components/schemas/BillingActionCapability'
        buy_inference_topup:
          $ref: '#/components/schemas/BillingActionCapability'
        change_plan:
          $ref: '#/components/schemas/BillingActionCapability'
        manage_subscription:
          $ref: '#/components/schemas/BillingActionCapability'
        subscribe:
          $ref: '#/components/schemas/BillingActionCapability'
        view_billing_history:
          $ref: '#/components/schemas/BillingActionCapability'
      required:
        - subscribe
        - change_plan
        - manage_subscription
        - view_billing_history
        - buy_credit_pack
        - buy_inference_topup
      type: object
    BillingSubscriptionPlan:
      additionalProperties: false
      properties:
        allowed_tiers:
          items:
            enum:
              - starter
              - pro
              - max
              - team
            type: string
          type: array
        credits_per_seat:
          format: int64
          type: integer
        kind:
          enum:
            - personal
            - team
          type: string
        monthly_price_per_seat_usd:
          format: double
          type: number
        seat_count:
          format: int64
          type: integer
        seats:
          items:
            $ref: '#/components/schemas/BillingSeatMember'
          type: array
      required:
        - seats
        - kind
        - allowed_tiers
        - seat_count
        - monthly_price_per_seat_usd
        - credits_per_seat
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    BillingActionCapability:
      description: >-
        One action's availability: available with how it is taken, or the reason
        it is unavailable, with the detail that reason names.
      discriminator:
        mapping:
          available: '#/components/schemas/BillingActionAvailable'
          checkout_pending: '#/components/schemas/BillingActionCheckoutPending'
          enterprise_invoice: '#/components/schemas/BillingActionEnterpriseInvoice'
          free_tier: '#/components/schemas/BillingActionFreeTier'
          managed_elsewhere: '#/components/schemas/BillingActionManagedElsewhere'
          no_billing_history: '#/components/schemas/BillingActionNoBillingHistory'
          payment_delinquent: '#/components/schemas/BillingActionPaymentDelinquent'
          provider_unavailable: '#/components/schemas/BillingActionProviderUnavailable'
          requires_org_admin: '#/components/schemas/BillingActionRequiresOrgAdmin'
          subscription_active: '#/components/schemas/BillingActionSubscriptionActive'
          subscription_pending: '#/components/schemas/BillingActionSubscriptionPending'
          team_plan_web_only: '#/components/schemas/BillingActionTeamPlanWebOnly'
          team_seats_via_membership: '#/components/schemas/BillingActionTeamSeatsViaMembership'
          web_only: '#/components/schemas/BillingActionWebOnly'
        propertyName: state
      oneOf:
        - $ref: '#/components/schemas/BillingActionAvailable'
        - $ref: '#/components/schemas/BillingActionManagedElsewhere'
        - $ref: '#/components/schemas/BillingActionSubscriptionActive'
        - $ref: '#/components/schemas/BillingActionSubscriptionPending'
        - $ref: '#/components/schemas/BillingActionCheckoutPending'
        - $ref: '#/components/schemas/BillingActionFreeTier'
        - $ref: '#/components/schemas/BillingActionPaymentDelinquent'
        - $ref: '#/components/schemas/BillingActionEnterpriseInvoice'
        - $ref: '#/components/schemas/BillingActionTeamPlanWebOnly'
        - $ref: '#/components/schemas/BillingActionTeamSeatsViaMembership'
        - $ref: '#/components/schemas/BillingActionWebOnly'
        - $ref: '#/components/schemas/BillingActionNoBillingHistory'
        - $ref: '#/components/schemas/BillingActionProviderUnavailable'
        - $ref: '#/components/schemas/BillingActionRequiresOrgAdmin'
    BillingSeatMember:
      additionalProperties: false
      properties:
        display_name:
          type: string
        email:
          type: string
        user_id:
          format: uuid
          type: string
      required:
        - user_id
        - email
      type: object
    BillingActionAvailable:
      additionalProperties: false
      properties:
        state:
          enum:
            - available
          type: string
        via:
          enum:
            - stripe_checkout
            - stripe_portal
            - store_purchase
            - store_customer_center
          type: string
      required:
        - state
        - via
      type: object
    BillingActionCheckoutPending:
      additionalProperties: false
      properties:
        state:
          enum:
            - checkout_pending
          type: string
      required:
        - state
      type: object
    BillingActionEnterpriseInvoice:
      additionalProperties: false
      properties:
        state:
          enum:
            - enterprise_invoice
          type: string
      required:
        - state
      type: object
    BillingActionFreeTier:
      additionalProperties: false
      properties:
        state:
          enum:
            - free_tier
          type: string
      required:
        - state
      type: object
    BillingActionManagedElsewhere:
      additionalProperties: false
      properties:
        managed_by:
          enum:
            - stripe
            - app_store
            - play_store
          type: string
        state:
          enum:
            - managed_elsewhere
          type: string
      required:
        - state
        - managed_by
      type: object
    BillingActionNoBillingHistory:
      additionalProperties: false
      properties:
        state:
          enum:
            - no_billing_history
          type: string
      required:
        - state
      type: object
    BillingActionPaymentDelinquent:
      additionalProperties: false
      properties:
        payment_state:
          enum:
            - blocked
            - past_due
            - unpaid
          type: string
        state:
          enum:
            - payment_delinquent
          type: string
      required:
        - state
        - payment_state
      type: object
    BillingActionProviderUnavailable:
      additionalProperties: false
      properties:
        state:
          enum:
            - provider_unavailable
          type: string
      required:
        - state
      type: object
    BillingActionRequiresOrgAdmin:
      additionalProperties: false
      properties:
        state:
          enum:
            - requires_org_admin
          type: string
      required:
        - state
      type: object
    BillingActionSubscriptionActive:
      additionalProperties: false
      properties:
        period_ends_at:
          format: date-time
          type: string
        state:
          enum:
            - subscription_active
          type: string
      required:
        - state
        - period_ends_at
      type: object
    BillingActionSubscriptionPending:
      additionalProperties: false
      properties:
        state:
          enum:
            - subscription_pending
          type: string
      required:
        - state
      type: object
    BillingActionTeamPlanWebOnly:
      additionalProperties: false
      properties:
        state:
          enum:
            - team_plan_web_only
          type: string
      required:
        - state
      type: object
    BillingActionTeamSeatsViaMembership:
      additionalProperties: false
      properties:
        state:
          enum:
            - team_seats_via_membership
          type: string
      required:
        - state
      type: object
    BillingActionWebOnly:
      additionalProperties: false
      properties:
        state:
          enum:
            - web_only
          type: string
      required:
        - state
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

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