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

# Create Access Token

> Authenticate using client credentials to obtain an access token



## OpenAPI

````yaml POST /auth/token
openapi: 3.0.1
info:
  title: Charp.ai API
  description: >-
    API ecosystem for vendor management, authentication, campaign management,
    and tools for enhancing campaign execution including realtime media
    generation
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://whilter-api-host
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Operations related to API authentication
  - name: Realtime Media
    description: Operations for generating personalized videos in real-time
  - name: Webhooks
    description: Webhook endpoints for receiving notifications
  - name: Virtual Try-On
    description: Operations related to virtual try-on functionality
  - name: Tasks
    description: Operations related to task management
paths:
  /auth/token:
    post:
      tags:
        - Authentication
      summary: Obtain Access Token
      description: Authenticate using client credentials to obtain an access token
      operationId: getAccessToken
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AuthRequest'
      responses:
        '200':
          description: AccessToken generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '401':
          description: Unauthorized - Invalid credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security: []
components:
  schemas:
    AuthRequest:
      type: object
      properties:
        client_id:
          type: string
          description: Client ID for authentication
        client_secret:
          type: string
          description: Client Secret for authentication
      required:
        - client_id
        - client_secret
    TokenResponse:
      type: object
      properties:
        access_token:
          type: string
          description: JWT access token
          example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
        token_type:
          type: string
          description: Type of token
          example: Bearer
        expires_in:
          type: integer
          description: Token expiration time in seconds
          example: 3600
      required:
        - access_token
        - token_type
        - expires_in
    ErrorResponse:
      type: object
      properties:
        error:
          type: boolean
          description: Indicates an error occurred
          example: true
        message:
          type: string
          description: Error message
          example: Invalid authentication token
        code:
          type: string
          description: Error code
          example: UNAUTHORIZED
        timestamp:
          type: string
          format: date-time
          description: Timestamp when the error occurred
          example: '2025-01-27T10:30:46Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````