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

# Issue a gateway token

> Issues a 15-minute token for one ready sandbox or running instance with sandbox-gateway, for callers with the workspace developer role. A sandbox also needs sandbox access, and an instance the instance:modify permission. Send it to a gateway as "authorization: Bearer <token>".



## OpenAPI

````yaml https://api.thundercompute.com:8443/openapi.json post /sandbox-gateway/token
openapi: 3.1.0
info:
  contact:
    email: support@thundercompute.com
    name: Thunder Compute API Support
    url: https://thundercompute.com/support
  description: >-
    Retrieve current GPU availability using mode-less spec keys

    Recommended for new integrations. The /status and /v1/status endpoints
    retain their legacy configuration keys for compatibility.
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://swagger.io/terms/
  title: Thunder Compute API
  version: '1.0'
servers:
  - description: Production server
    url: https://api.thundercompute.com:8443/v1
  - description: Production server
    url: https://api.thundercompute.com:8443
security: []
externalDocs:
  description: ''
  url: ''
paths:
  /sandbox-gateway/token:
    post:
      tags:
        - Sandboxes
      summary: Issue a gateway token
      description: >-
        Issues a 15-minute token for one ready sandbox or running instance with
        sandbox-gateway, for callers with the workspace developer role. A
        sandbox also needs sandbox access, and an instance the instance:modify
        permission. Send it to a gateway as "authorization: Bearer <token>".
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/thundertypes.SandboxGatewayTokenRequest'
              summary: body
              description: Sandbox or instance
        description: Sandbox or instance
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thundertypes.SandboxGatewayTokenResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thundertypes.ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thundertypes.ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thundertypes.ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thundertypes.ErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thundertypes.ErrorResponse'
          description: Conflict
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thundertypes.ErrorResponse'
          description: Service Unavailable
      security:
        - ApiKeyAuth: []
components:
  schemas:
    thundertypes.SandboxGatewayTokenRequest:
      properties:
        instanceId:
          description: InstanceID is an instance's index or UUID.
          type: string
        sandboxId:
          type: string
        workspaceId:
          description: >-
            WorkspaceID optionally selects the sandbox's workspace; it must
            match

            the sandbox's stored ownership.
          type: string
      type: object
    thundertypes.SandboxGatewayTokenResponse:
      properties:
        expiresAt:
          type: string
        sandboxId:
          description: >-
            SandboxID is the sandbox the token opens; for an instance, its
            sandbox.
          type: string
        token:
          type: string
      type: object
    thundertypes.ErrorResponse:
      properties:
        code:
          example: 400
          type: integer
        error:
          example: invalid_request
          type: string
        message:
          example: The request is malformed
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: >-
        Bearer token authentication. Provide your API token prefixed with
        "Bearer ", e.g. "Bearer your-api-token".
      in: header
      name: Authorization
      type: apiKey

````

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