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

# Start CLI device authentication



## OpenAPI

````yaml /api-reference/openapi.json post /auth/device
openapi: 3.1.0
info:
  title: Archal API
  summary: >-
    Public API for Archal CLI, session, trace, result, and runtime clone
    integrations.
  description: >-
    Archal provisions service-shaped clones of third-party services so AI agents
    can be tested before they touch production. This spec covers Archal-owned
    control-plane endpoints and the runtime proxy shape agents use to call clone
    APIs.
  version: 0.3.0
servers:
  - url: https://archal.ai
    description: Archal web and CLI API
  - url: https://api.archal.ai
    description: Hosted runtime proxy
security:
  - archalToken: []
tags:
  - name: Auth
    description: CLI and device authentication.
  - name: Catalog
    description: Clone and scenario discovery.
  - name: Sessions
    description: Hosted clone session lifecycle.
  - name: Results
    description: Run, trace, and test-result reporting.
  - name: Runtime
    description: Direct calls into a running clone.
paths:
  /auth/device:
    post:
      tags:
        - Auth
      summary: Start CLI device authentication
      operationId: createDeviceAuthRequest
      responses:
        '200':
          description: Device-code authentication challenge.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceAuthCreateResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/Unavailable'
      security: []
components:
  schemas:
    DeviceAuthCreateResponse:
      type: object
      required:
        - device_code
        - user_code
        - verification_uri
        - verification_uri_complete
        - expires_in
        - interval
      properties:
        device_code:
          type: string
        user_code:
          type: string
        verification_uri:
          type: string
          format: uri
        verification_uri_complete:
          type: string
          format: uri
        expires_in:
          type: integer
          examples:
            - 600
        interval:
          type: integer
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        message:
          type: string
        detail:
          type: string
      additionalProperties: true
  responses:
    RateLimited:
      description: Rate limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unavailable:
      description: Required backing service is unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    archalToken:
      type: http
      scheme: bearer
      bearerFormat: Archal API token

````