---
title: "CreateLLMAccessToken"
method: POST
path: "/gitpod.v1.AgentService/CreateLLMAccessToken"
tags: ["gitpod.v1.AgentService"]
---

# CreateLLMAccessToken

`POST /gitpod.v1.AgentService/CreateLLMAccessToken`

Creates a token for LLM access with a specific agent run.

## Request body

- GitpodV1CreateLLMAccessTokenRequest
  - `agentExecutionId` string — The agent execution ID for tracking and runner selection. If empty, falls back to current logic for backward compatibility.
  - `requiredModels` GitpodV1SupportedModel[] — The models required by the agent to function.

## Response `200`

Success

- GitpodV1CreateLLMAccessTokenResponse
  - `accessToken` string
  - `codexConfiguration` GitpodV1LLMIntegrationCodexConfiguration — LLMIntegrationCodexConfiguration contains Codex-specific model aliases for an LLM integration.
    - `modelMappings` GitpodV1LLMIntegrationCodexConfigurationModelMapping[]
      - `model` 'CODEX_OPEN_AI_MODEL_UNSPECIFIED' | 'CODEX_OPEN_AI_MODEL_GPT_5_5' | 'CODEX_OPEN_AI_MODEL_GPT_5_4' | 'CODEX_OPEN_AI_MODEL_GPT_5_4_MINI' | 'CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX' | 'CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX_SPARK' | 'CODEX_OPEN_AI_MODEL_GPT_5_2' | 'CODEX_OPEN_AI_MODEL_GPT_5_6_SOL' | 'CODEX_OPEN_AI_MODEL_GPT_5_6_TERRA' | 'CODEX_OPEN_AI_MODEL_GPT_5_6_LUNA' — CodexOpenAIModel is the static allowlist of concrete OpenAI models that the Codex app runtime can select through Ona's Codex picker.
      - `providerModel` string — provider_model is the exact model identifier expected by the upstream integration.
  - `disabledCapabilities` GitpodV1LLMDisabledCapability[] — disabled_capabilities lists provider capabilities unavailable for this LLM access token.
  - `isServerSideToolSearchEnabled` boolean — is_server_side_tool_search_enabled indicates whether the LLM provider supports Anthropic's server-side BM25 tool search. Computed by the management plane based on the provider type and feature flags.
  - `llmUrl` string
  - `tokenSource` 'LLM_TOKEN_SOURCE_UNSPECIFIED' | 'LLM_TOKEN_SOURCE_DIRECT_API' | 'LLM_TOKEN_SOURCE_BEDROCK' | 'LLM_TOKEN_SOURCE_BEDROCK_MANTLE' | 'LLM_TOKEN_SOURCE_VERTEX_AI' — LLMTokenSource identifies how an LLM integration obtains model access. It is independent from LLMProvider, which identifies the model family.

## Other responses

- `default` — Error

---

[API](https://skmtc.net/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.net/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/versions/44d50c2ac284/schema)
