Skip to main content

Introduction

Everything you need to integrate Nexus into your product stack.

Overview

Nexus provides a unified API for text generation, image creation, and workflow automation. Authenticate with a single API key and start making requests in under a minute.

Before you begin

You'll need an account and an API key. Sign up at example.com/sign-up to get started for free.

Quick Start

Install the SDK and make your first completion request in three steps.

Terminal
npm install @your-org/sdk
app.ts
import { AIClient } from "@your-org/sdk";

const client = new AIClient({
  apiKey: process.env.YOUR_SERVICE_API_KEY,
});

const response = await client.completions.create({
  model: "gpt-4",
  prompt: "Summarize our Q4 revenue report",
  maxTokens: 256,
});

const text = response.text;
// Use `text` in your UI, API route, or downstream workflow.

That's it!

You've just made your first AI completion. Explore the full API reference to unlock image generation, webhooks, and more.

Installation

The SDK supports Node.js 18+ and all modern edge runtimes. Choose your preferred package manager:

npm
npm install @your-org/sdk
pnpm
pnpm add @your-org/sdk
yarn
yarn add @your-org/sdk

Environment variables

Never commit your API key to version control. Use .env.local or your platform's secret management to store it securely.

Authentication

All requests require a Bearer token in the Authorization header. The SDK handles this automatically when you pass your API key.

cURL
curl https://api.example.com/v1/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-4", "prompt": "Hello"}'

Rate Limits

Rate limits are applied per API key and vary by plan:

PlanRequests / minTokens / day
Free2010,000
Pro200500,000
EnterpriseUnlimitedUnlimited