---
title: "InvokeModel"
method: POST
path: "/gitpod.v1.LLMService/InvokeModel"
tags: ["gitpod.v1.LLMService"]
---

# InvokeModel

`POST /gitpod.v1.LLMService/InvokeModel`

## Request body

- GitpodV1InvokeModelRequest
  - `anthropicRequest` GitpodV1AnthropicRequest, required
    - `maxTokens` integer
    - `messages` GitpodV1AnthropicMessage[] — unresolved $ref
    - `temperature` number, double
    - `toolChoice` object
    - `tools` GitpodV1AnthropicRequestTool[]
      - `description` string
      - `inputSchema` GitpodV1AnthropicRequestToolInputSchema
        - `description` string
        - `items` GitpodV1AnthropicRequestToolInputSchema — recursive
        - `properties` object
        - `required` string[]
        - `type` 'string' | 'integer' | 'object' | 'array' | 'boolean'
      - `name` string

## Response `200`

Success

- GitpodV1InvokeModelResponse
  - `anthropicResponse` GitpodV1AnthropicResponse, required — unresolved $ref

## Other responses

- `default` — Error

## Changes

- **2025-02-21** `3655d5ad0ac3` — 2 breaking, 1 warning, 13 info
  - the `anthropicRequest` request property type/format changed from ``/`` to `object`/``
  - the `anthropicResponse` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - removed `#/components/schemas/gitpod.v1.AnthropicRequest` from the `anthropicRequest` request property `allOf` list
  - added the new optional request property `anthropicRequest/maxTokens`
  - …12 more
- **2025-02-18** `cd6a05ae99d2` — 1 warning
  - removed the optional property `detail` from the response with the `default` status

[Change history](https://skmtc.dev/gitpod-io/apis/gitpod-v1/changes/gitpod.v1.LLMService/InvokeModel/post.md)

---

[API](https://skmtc.dev/gitpod-io/apis/gitpod-v1.md) · [All operations](https://skmtc.dev/gitpod-io/apis/gitpod-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gitpod-io/gitpod-v1/revisions/3655d5ad0ac3/schema)
