# IAiBackend interface

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 interface IAiBackend
```

Abstraction over an LLM provider. Implementations wrap the actual HTTP + JSON dance for a specific service (Anthropic, OpenAI, Google, OpenRouter, ...) or for a development stand-in like the play-act backend.

**Derived types:** [AnthropicAiBackend](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.anthropicaibackend.md), [GeminiAiBackend](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.geminiaibackend.md), [OpenAiCompatibleBackend](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.openaicompatiblebackend.md)

## Properties

- [Provider](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.iaibackend/provider.md): Gets the provider associated with this backend.
- [TranscriptCallback](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.descriptive.iaibackend/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.iaibackend/generate.md): Generate the next turn for the conversation. The full message history is passed on every call, the wire protocol is stateless. `tools` declares which tools the model is allowed to invoke this turn.
