Skip to main content
In addition to context.call, you can also make third‑party requests using the context.api namespace. This namespace provides built‑in integrations for OpenAI, Anthropic, and Resend, allowing you to make requests in a type‑safe manner.
const { status, body } = await context.api.openai.call("Call OpenAI", {
  token: "<OPENAI_API_KEY>",
  operation: "chat.completions.create",
  body: {
    model: "gpt-4o",
    messages: [
      {
        role: "system",
        content: "Assistant says 'hello!'",
      },
      { role: "user", content: "User shouts back 'hi!'" },
    ],
  },
});
We’ll continue adding more integrations over time. If you’d like to see a specific integration, feel free to contribute to the SDK or contact us with your suggestion. For detailed guides on usage and configuration, see the Integrations section.