SDKs
The Opelyx API is a standard REST API that works with any HTTP client. Code examples in curl, Python, and JavaScript are provided throughout the documentation.
Using the API
Section titled “Using the API”Python
Section titled “Python”import requests
API_KEY = "op_YOUR_API_KEY_HERE"BASE_URL = "https://api.opelyx.com"
def search_plans(zip_code: str, age: int, **filters): response = requests.get( f"{BASE_URL}/v1/health/plans", headers={"Authorization": f"Bearer {API_KEY}"}, params={"zip": zip_code, "age": age, **filters}, ) response.raise_for_status() return response.json()JavaScript / TypeScript
Section titled “JavaScript / TypeScript”const API_KEY = "op_YOUR_API_KEY_HERE";const BASE_URL = "https://api.opelyx.com";
async function searchPlans(zip, age, filters = {}) { const params = new URLSearchParams({ zip, age: String(age), ...filters }); const response = await fetch(`${BASE_URL}/v1/health/plans?${params}`, { headers: { Authorization: `Bearer ${API_KEY}` }, }); if (!response.ok) throw new Error(`API error: ${response.status}`); return response.json();}OpenAPI Spec
Section titled “OpenAPI Spec”The complete API specification is available at:
https://api.opelyx.com/openapi.jsonUse this with code generation tools like openapi-typescript, openapi-generator, or orval to generate type-safe clients for your project.