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

# Create Agent Access project

> Issue an Agent Access API key. Submit the challenge `token` and computed integer `answer`
from GET /v1/agent-access/challenge. GET on this path returns a guide, not a key.
Optional `identity_token` as an OIDC JWT grants more credits. `identity_provider` is optional
when the JWT `iss` is Google (`https://accounts.google.com`), GitHub Actions
(`https://token.actions.githubusercontent.com`), or Vercel (`https://vercel.com`).
Returns `api_key` for header `anchor-api-key`.
Docs: https://docs.anchorbrowser.io/quickstart/agent-access




## OpenAPI

````yaml /openapi.yaml post /v1/agent-access
openapi: 3.1.0
info:
  title: AnchorBrowser API
  version: 1.0.0
  description: APIs to manage all browser-related actions and configuration.
servers:
  - url: https://api.anchorbrowser.io
    description: API server
security: []
paths:
  /v1/agent-access:
    post:
      tags:
        - Agent Access
      summary: Create Agent Access project
      description: >
        Issue an Agent Access API key. Submit the challenge `token` and computed
        integer `answer`

        from GET /v1/agent-access/challenge. GET on this path returns a guide,
        not a key.

        Optional `identity_token` as an OIDC JWT grants more credits.
        `identity_provider` is optional

        when the JWT `iss` is Google (`https://accounts.google.com`), GitHub
        Actions

        (`https://token.actions.githubusercontent.com`), or Vercel
        (`https://vercel.com`).

        Returns `api_key` for header `anchor-api-key`.

        Docs: https://docs.anchorbrowser.io/quickstart/agent-access
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - token
                - answer
              properties:
                token:
                  type: string
                  minLength: 1
                  description: >-
                    Token returned by GET /v1/agent-access/challenge. Not the
                    puzzle answer.
                answer:
                  type: string
                  minLength: 1
                  description: Final integer from the challenge prompt, as a string.
                identity_provider:
                  type: string
                  description: >-
                    Optional when identity_token is an OIDC JWT whose iss
                    matches a known provider (google, github, or vercel).
                    Required for opaque OAuth access tokens (google or github).
                identity_token:
                  type: string
                  description: >-
                    OIDC JWT preferred (iss auto-detected). GitHub Actions — GET
                    $ACTIONS_ID_TOKEN_REQUEST_URL with Authorization bearer
                    $ACTIONS_ID_TOKEN_REQUEST_TOKEN. Google — ID token JWT.
                    Vercel — Sign in with Vercel user ID token (iss
                    https://vercel.com). Opaque OAuth access tokens also work
                    with identity_provider set.
                identity_audience:
                  type: string
                  description: >-
                    Optional. Pin the JWT aud claim. Omit unless you requested a
                    specific aud.
      responses:
        '200':
          description: API key issued. Follow `next` to make an authenticated call.
          content:
            application/json:
              schema:
                type: object
                required:
                  - api_key
                  - project_id
                  - credits_granted
                  - auth
                  - next
                  - docs
                  - limits
                properties:
                  api_key:
                    type: string
                    description: >-
                      API key for authenticated requests. Send as header
                      anchor-api-key.
                  project_id:
                    type: string
                    description: Anchor project id created or reused for this onboarding.
                  credits_granted:
                    type: number
                    description: >-
                      Credits added by this POST. 0 when the Agent Access
                      project already existed for this owner.
                  agent_identity_token:
                    type: string
                    description: >-
                      When present, send as header anchor-identity-token on
                      later API calls when auth.identity_token_required is true.
                  auth:
                    type: object
                    required:
                      - api_key_header
                      - identity_token_required
                    properties:
                      api_key_header:
                        type: string
                        description: Header name for api_key (anchor-api-key).
                      identity_token_header:
                        type: string
                        description: >-
                          Header name for agent_identity_token when
                          identity_token_required is true.
                      identity_token_required:
                        type: boolean
                        description: >-
                          When true, authenticated API calls must include
                          anchor-identity-token in addition to anchor-api-key.
                  upgrade:
                    type: object
                    required:
                      - message
                    properties:
                      message:
                        type: string
                        description: >-
                          How to repeat onboarding with identity_token to
                          receive more credits.
                  next:
                    $ref: '#/components/schemas/AgentAccessNextStep'
                  docs:
                    type: string
                    description: Human-readable guide URL for Agent Access.
                  limits:
                    type: object
                    required:
                      - session_max_duration_minutes
                    properties:
                      session_max_duration_minutes:
                        type: number
                        description: >-
                          Maximum session duration in minutes for keys issued
                          through Agent Access.
        '400':
          description: >-
            Missing token/answer, expired token, or incomplete identity fields.
            Follow `next`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentAccessError'
        '401':
          description: Incorrect answer or invalid identity token. Follow `next`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentAccessError'
        '429':
          description: Too many onboarding attempts from this source.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentAccessError'
        '500':
          description: Failed to create project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentAccessError'
      security: []
components:
  schemas:
    AgentAccessNextStep:
      type: object
      required:
        - method
        - path
        - description
      properties:
        method:
          type: string
          enum:
            - GET
            - POST
          description: HTTP method for the next call in the Agent Access onboarding flow.
        path:
          type: string
          description: >-
            Path on https://api.anchorbrowser.io for the next call. Prepend the
            method to execute it.
        description:
          type: string
          description: >-
            Plain-language instruction for what to do on the next call and what
            you receive afterward.
    AgentAccessError:
      type: object
      required:
        - error
        - next
        - docs
      properties:
        error:
          type: string
          description: Why the request failed.
        next:
          $ref: '#/components/schemas/AgentAccessNextStep'
        docs:
          type: string
          description: Human-readable guide URL for Agent Access.
          example: https://docs.anchorbrowser.io/quickstart/agent-access

````