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

# Cross-device authorization relay

> The cross-device `redirect_uri` target. When the portal redirects the authorization code here (after the user approves on another machine), this endpoint 302-redirects to the portal confirmation page. That page displays standard Base64 of `state=<url-encoded>&code=<url-encoded>` — which the user copies and pastes back into the waiting `aws login --remote` prompt. There is no polling: the CLI waits for user input, not for a status response from this endpoint. No API key is required.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/sessions/confirmation
openapi: 3.0.3
info:
  title: AI Reserve Gateway API
  description: >-
    The AI Reserve API surface — OpenAI-compatible chat completions,
    Anthropic-compatible messages, Bedrock Converse, images, video, files,
    text-to-speech, realtime voice sessions, and provider-hidden GPU
    infrastructure — all behind one endpoint and one API key.
  version: 1.0.0
servers:
  - url: https://api.aireserve.com
security:
  - bearerAuth: []
tags:
  - name: Customers
    description: >-
      Per-end-customer usage, cost, and billable amounts for organizations that
      tag requests with their own customers.
  - name: GPU Infrastructure
    description: >-
      Provision and manage provider-hidden GPU instances. The recommended
      Instances API accepts workload requirements and an hourly price ceiling;
      AI Reserve handles provider placement internally. Every mutation is
      asynchronous and returns an operation to poll.
  - name: Customer keys
    description: >-
      Mint, list, and revoke API keys pinned to your own end customers (and
      their organizations), so spend splits per customer without per-request
      tagging.
  - name: AWS CLI login
    description: >-
      Browser-authorization endpoints consumed by `aws login --profile …` (AWS
      CLI v2.32.0+). All three routes are unauthenticated — the caller has no
      credential until `/v1/token` succeeds.
paths:
  /v1/sessions/confirmation:
    get:
      tags:
        - AWS CLI login
      summary: Cross-device authorization relay
      description: >-
        The cross-device `redirect_uri` target. When the portal redirects the
        authorization code here (after the user approves on another machine),
        this endpoint 302-redirects to the portal confirmation page. That page
        displays standard Base64 of `state=<url-encoded>&code=<url-encoded>` —
        which the user copies and pastes back into the waiting `aws login
        --remote` prompt. There is no polling: the CLI waits for user input, not
        for a status response from this endpoint. No API key is required.
      operationId: awsCliSessionConfirmation
      parameters:
        - name: code
          in: query
          required: true
          description: >-
            Authorization code from the portal, forwarded from the
            `/v1/authorize` redirect.
          schema:
            type: string
        - name: state
          in: query
          required: true
          description: >-
            CSRF state token from the `/v1/authorize` redirect, forwarded
            unchanged.
          schema:
            type: string
      responses:
        '302':
          description: >-
            Redirect to the portal confirmation page. The page shows the
            Base64-encoded `code` and `state` string the user pastes into the
            CLI.
          headers:
            Location:
              description: Portal confirmation page URL.
              schema:
                type: string
                format: uri
        '400':
          description: Missing or malformed `code` or `state` query parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AwsCliLoginError'
        '500':
          description: The confirmation page could not be opened.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AwsCliLoginError'
      security: []
components:
  schemas:
    AwsCliLoginError:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Machine-readable Sign-In error code.
        message:
          type: string
          description: Human-readable explanation of the error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your AI Reserve API key (aireserve_api_…) from the API Keys page in the
        portal (https://portal.aireserve.com/keys).

````

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