Skills Artificial Intelligence OpenEvidence SDK Installation And Authentication

OpenEvidence SDK Installation And Authentication

v20260423
openevidence-install-auth
This guide provides comprehensive steps to install and authenticate the OpenEvidence SDK/API. It covers setting up environment variables, installing required packages (supporting both Node.js and Python), and verifying the connection using sample code. This is essential for developers integrating OpenEvidence's medical AI capabilities for clinical decision support and evidence-based queries into a new application.
Get Skill
302 downloads
Overview

OpenEvidence Install & Auth

Overview

Set up OpenEvidence Medical AI API for clinical decision support and evidence-based queries.

Prerequisites

  • OpenEvidence account and API access
  • API key/credentials from OpenEvidence dashboard
  • Node.js 18+ or Python 3.8+

Instructions

Step 1: Install SDK

npm install @openevidence/sdk
# API key from OpenEvidence developer portal

Step 2: Configure Authentication

export OPENEVIDENCE_API_KEY="your-api-key-here"
echo 'OPENEVIDENCE_API_KEY=your-api-key' >> .env

Step 3: Verify Connection (TypeScript)

import { OpenEvidenceClient } from '@openevidence/sdk';
const client = new OpenEvidenceClient({
  apiKey: process.env.OPENEVIDENCE_API_KEY,
  organization: process.env.OPENEVIDENCE_ORG_ID
});
const result = await client.query({ question: 'What are first-line treatments for Type 2 diabetes?' });
console.log(`Answer: ${result.answer.substring(0, 100)}...`);
console.log(`Citations: ${result.citations.length} references`);

Step 4: Verify Connection (Python)

import openevidence
client = openevidence.Client(api_key=os.environ['OPENEVIDENCE_API_KEY'])
result = client.query(question='What are first-line treatments for Type 2 diabetes?')
print(f'Answer: {result.answer[:100]}...')
print(f'Citations: {len(result.citations)} references')

Error Handling

Error Code Solution
Invalid API key 401 Verify credentials in dashboard
Permission denied 403 Check API scopes/permissions
Rate limited 429 Implement backoff

Resources

Next Steps

After auth, proceed to openevidence-hello-world.

Info
Name openevidence-install-auth
Version v20260423
Size 2.15KB
Updated At 2026-04-28
Language