Skip to content

[JS] [Antropic] should support providing api key at runtime #4245

@pavelgj

Description

@pavelgj
import { genkit } from "genkit";
import { anthropic } from "@genkit-ai/anthropic";

const ai = genkit({
  plugins: [anthropic({ apiKey: false })],
});

const response = await ai.generate({
  model: anthropic.model("claude-haiku-4-5"),
  prompt: "Tell me a joke.",
  config: {
    apiKey: process.env.ANTHROPIC_API_KEY,
  }
});

Metadata

Metadata

Assignees

Labels

featureNew feature or requestjs

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions