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

# Create remote tunnel

> Create a new remote tunnel that exposes local ports via Cloudflare. Returns a tunnelToken to start the cloudflared daemon.



## OpenAPI

````yaml /api-reference/api.json post /v1/remote-tunnels
openapi: 3.0.0
info:
  title: QA.tech API
  version: 1.0.0
  contact:
    name: QA.tech
    url: https://qa.tech
    email: support@qa.tech
  description: >-
    REST API for triggering and managing AI-powered test runs. Authenticate with
    a project API token (Authorization: Bearer <token>) found in Project
    Settings -> Integrations.
servers:
  - url: https://api.qa.tech
    description: Production
    variables: {}
security:
  - BearerAuth: []
tags:
  - name: Runs
  - name: Infrastructure
  - name: Test Cases
  - name: Application Builds
  - name: Status badge
  - name: Remote Tunnels
  - name: Chat
  - name: Applications
paths:
  /v1/remote-tunnels:
    post:
      tags:
        - Remote Tunnels
      summary: Create remote tunnel
      description: >-
        Create a new remote tunnel that exposes local ports via Cloudflare.
        Returns a tunnelToken to start the cloudflared daemon.
      operationId: CreateRemoteTunnel
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRemoteTunnelRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRemoteTunnelResponse'
components:
  schemas:
    CreateRemoteTunnelRequest:
      type: object
      required:
        - ports
      properties:
        ports:
          type: array
          items:
            $ref: '#/components/schemas/PortMappingRequest'
          description: One or more local ports to expose via the tunnel
        public:
          type: boolean
          description: >-
            If true, the tunnel is publicly accessible without Cloudflare Access
            authentication
      description: Request body to create a new remote tunnel
    CreateRemoteTunnelResponse:
      type: object
      required:
        - runnerId
        - hostnames
        - tunnelToken
        - expiresAt
      properties:
        runnerId:
          type: string
          description: Our identifier for this runner, used in subsequent API calls
        hostnames:
          type: array
          items:
            $ref: '#/components/schemas/HostnameInfo'
          description: Public hostnames mapped to local ports
        tunnelToken:
          type: string
          description: cloudflared token to start the tunnel daemon
        expiresAt:
          type: string
          description: ISO timestamp when this tunnel will expire
      description: Response after successfully creating a remote tunnel
    PortMappingRequest:
      type: object
      required:
        - localPort
      properties:
        localPort:
          type: integer
          format: int32
          description: Local port to expose
        protocol:
          type: string
          enum:
            - http
            - https
          description: Protocol for the local service (defaults to http)
        subdomain:
          type: string
          description: >-
            Optional subdomain label for this port (e.g. 'api' ->
            r-{id}-api.quack.run)
      description: A single port mapping to expose through the tunnel
    HostnameInfo:
      type: object
      required:
        - localPort
        - url
      properties:
        localPort:
          type: integer
          format: int32
          description: The local port this hostname maps to
        url:
          type: string
          description: The public HTTPS URL for this port
      description: A single hostname mapping returned by the tunnel
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````