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

# Create Subscription Checkout

> Create a Stripe Checkout Session for an AI Hire subscription.



## OpenAPI

````yaml /openapi.json post /api/v1/workspaces/subscribe
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/workspaces/subscribe:
    post:
      tags:
        - Workspaces
      summary: Create Subscription Checkout
      description: Create a Stripe Checkout Session for an AI Hire subscription.
      operationId: create_subscription_checkout_api_v1_workspaces_subscribe_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubscriptionCheckoutRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionCheckoutResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateSubscriptionCheckoutRequest:
      properties:
        agent_type:
          type: string
          title: Agent Type
        tier:
          type: string
          title: Tier
          default: starter
      type: object
      required:
        - agent_type
      title: CreateSubscriptionCheckoutRequest
    SubscriptionCheckoutResponse:
      properties:
        checkout_url:
          type: string
          title: Checkout Url
        session_id:
          type: string
          title: Session Id
      type: object
      required:
        - checkout_url
        - session_id
      title: SubscriptionCheckoutResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````