vennaVenna
Guides

Use with libraries

Point the OpenAI SDKs, the Vercel AI SDK, or raw curl at the Venna gateway with a one-line base URL change.

Point any OpenAI-compatible client at https://gateway.venna.net/v1 with your workspace vk_ key as the API key — the rest of your code is unchanged.

Keep the key in the environment

Read the key from VENNA_API_KEY (your vk_ key from the Console), never a literal secret in source.

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://gateway.venna.net/v1",
  apiKey: process.env.VENNA_API_KEY,
});

const completion = await client.chat.completions.create({
  model: "venna-fast",
  messages: [{ role: "user", content: "In one sentence, what is Venna?" }],
});

console.log(completion.choices[0]?.message.content);

Add stream: true and iterate the returned async iterable to stream tokens.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://gateway.venna.net/v1",
    api_key=os.environ["VENNA_API_KEY"],
)

completion = client.chat.completions.create(
    model="venna-fast",
    messages=[{"role": "user", "content": "In one sentence, what is Venna?"}],
)

print(completion.choices[0].message.content)
import { createOpenAI } from "@ai-sdk/openai";
import { generateText } from "ai";

const venna = createOpenAI({
  baseURL: "https://gateway.venna.net/v1",
  apiKey: process.env.VENNA_API_KEY,
});

const { text } = await generateText({
  model: venna("venna-fast"),
  prompt: "In one sentence, what is Venna?",
});

console.log(text);
curl https://gateway.venna.net/v1/chat/completions \
  -H "Authorization: Bearer $VENNA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "venna-fast",
    "messages": [
      { "role": "user", "content": "In one sentence, what is Venna?" }
    ]
  }'

Next steps

  • Quickstart — the end-to-end first-call walkthrough.
  • Authentication — when to swap the vk_ key for a plan JWT or an x402 wallet payment.
  • API reference — every endpoint, generated from the live gateway OpenAPI spec.

On this page