# AnthropicAiBackend class

Namespace: [Grasshopper2.Components.Descriptive](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.components.descriptive.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class AnthropicAiBackend : IAiBackend
```

IAiBackend implementation talking to Anthropic's Messages API directly over HTTPS. Supports tool use and prompt caching of the system block, which gives a ~10x cost reduction on cached input tokens once the cache is warm.

## Constructors

- [AnthropicAiBackend](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.anthropicaibackend/ctor.md)

## Properties

- [MaxTokens](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.anthropicaibackend/maxtokens.md): Maximum tokens the model may produce in a single turn.
- [Model](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.anthropicaibackend/model.md): Model identifier passed to the API. Defaults to the latest Opus.
- [Provider](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.anthropicaibackend/provider.md)
- [TranscriptCallback](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.anthropicaibackend/transcriptcallback.md): Optional hook invoked with (requestJson, responseBody) after every HTTP exchange, including non-2xx responses and retries. The host uses this to maintain a complete transcript of what was sent and received. Backends must invoke this before throwing on non-success status codes.

## Methods

- [Generate](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.anthropicaibackend/generate.md)
