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-latest
  • openai/gpt-latest
  • openai/gpt-latest
  • openai/gpt-mini-latest

Anthropic

  • anthropic/claude-sonnet-latest
  • anthropic/claude-opus-latest
  • anthropic/claude-sonnet-latest

Google

  • vertex/gemini-2.5-pro
  • vertex/gemini-flash-latest

Cohere and Meta Llama

  • cohere/command-a-03-2025
  • scaleway/llama-3.3-70b-instruct

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