Skip to main content
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

Supported Types

models.AnthropicTextBlockParam

const value: models.AnthropicTextBlockParam = {
  text: "Hello, world!",
  type: "text",
};

models.AnthropicImageBlockParam

const value: models.AnthropicImageBlockParam = {
  source: {
    data: "/9j/4AAQ...",
    mediaType: "image/jpeg",
    type: "base64",
  },
  type: "image",
};

models.ContentToolReference

const value: models.ContentToolReference = {
  toolName: "<value>",
  type: "tool_reference",
};

models.AnthropicSearchResultBlockParam

const value: models.AnthropicSearchResultBlockParam = {
  content: [
    {
      text: "Result content",
      type: "text",
    },
  ],
  source: "example_source",
  title: "Example Result",
  type: "search_result",
};

models.AnthropicDocumentBlockParam

const value: models.AnthropicDocumentBlockParam = {
  source: {
    data: "Hello, world!",
    mediaType: "text/plain",
    type: "text",
  },
  type: "document",
};