Frameworks

Vercel AI SDK + Velisity

createOpenAI with our baseURL: streamText, generateObject and tools.

4 steps

Setup

  1. Key

    Create a key in the console and put it in the VELISITY_API_KEY environment variable. The configs below read it from there.

    bash
    export VELISITY_API_KEY="vls_live_…"
    Get a key →
  2. Install the provider

    npm i ai @ai-sdk/openai
  3. Create the provider

    Use .chat(): it calls /chat/completions, which every catalog model supports.

    ts
    import { createOpenAI } from "@ai-sdk/openai";import { streamText } from "ai"; const velisity = createOpenAI({  baseURL: "https://api.velisity.live/v1",  apiKey: process.env.VELISITY_API_KEY,}); const result = streamText({ model: velisity.chat("anthropic/claude-sonnet-4-5"), prompt: "ping" });for await (const delta of result.textStream) process.stdout.write(delta);
  4. Check that it works

    A request to /v1/key returns the key name, limits and balance — if you get JSON back, the key and URL are right.

    bash
    curl https://api.velisity.live/v1/key -H "Authorization: Bearer $VELISITY_API_KEY"

Your first request in a minute

Create a key, change the base_url — and your code already works with any model. You only pay for answers.