Skip to main content
Use the official OpenAI TypeScript/JavaScript SDK with Eden AI for seamless multi-provider access.

Overview

The OpenAI TypeScript SDK works perfectly with Eden AI’s V3 API. Configure the base URL and start using 500+ models from multiple providers.

Installation

Install the OpenAI SDK for Node.js:

Quick Start

Configure the client to use Eden AI:

Available Models

Access models from multiple providers:

OpenAI

  • openai/gpt-4
  • openai/gpt-4-turbo
  • openai/gpt-4o
  • openai/gpt-3.5-turbo

Anthropic

  • anthropic/claude-sonnet-4-5
  • anthropic/claude-opus-4-5
  • anthropic/claude-sonnet-4-5

Google

  • google/gemini-2.5-pro
  • google/gemini-2.5-flash

Cohere & Meta

  • cohere/command-r-plus
  • meta/llama-3-70b

Multi-Turn Conversations

Build stateful chat applications:

Advanced Parameters

Control model behavior:

Vision Capabilities

Send images to vision models:

Error Handling

Handle API errors properly:

Express.js Integration

Build a chat API with Express:

React Integration

Stream responses in a React application:

Environment Variables

Use .env files for configuration:

Complete Chat CLI Example

Build a command-line chat interface:

List Available Models

Programmatically discover models:

Next Steps