Skip to main content
This release is 11 versions behind 2.0.0 — the latest version of @open-schemas/types. Jump to latest

Type definitions for the API of LLM providers.

Works with
This package works with Bun
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Browsers
JSR Score
100%
Published
a week ago
indexanthropic
deno add @open-schemas/types
import * as mod from "@open-schemas/types/anthropic";
npx jsr add @open-schemas/types
import * as mod from "@open-schemas/types/anthropic";
yarn dlx jsr add @open-schemas/types
import * as mod from "@open-schemas/types/anthropic";
pnpm dlx jsr add @open-schemas/types
import * as mod from "@open-schemas/types/anthropic";
bunx jsr add @open-schemas/types
import * as mod from "@open-schemas/types/anthropic";

This module contains types for Anthtopic API.

Examples

Example 1

import { CreateMessageRequest } from "@open-schemas/types/anthropic";

const request: CreateMessageRequest = {};

Type Aliases

T
Content
from anthropic

The union type of TextContent and ImageContent.

T
ContentBlockDeltaEvent
from anthropic

The delta event for content block.

T
ContentBlockStartEvent
from anthropic

The start event for content block.

T
ContentBlockStopEvent
from anthropic

The stop event for content block.

T
CreateMessageRequest
from anthropic

The request for creating a message.

T
CreateMessageResponse
from anthropic

The response for creating a message.

T
ImageContent
from anthropic

Starting with Claude 3 models, you can also send image content.

T
ImageContentSource
from anthropic

The source of ImageContent.

T
Message
from anthropic

Input messages.

T
MessageDeltaEvent
from anthropic

Indicates top-level changes to the final Message object.

T
MessageStartEvent
from anthropic

Contains a Message object with empty content.

T
MessageStopEvent
from anthropic

A final message_stop event.

T
MessageUsage
from anthropic

Billing and rate-limit usage.

T
StopReason
from anthropic

The reason that we stopped.

T
TextContent
from anthropic

Text content.