Token Kiosk
Integrations

Vercel AI SDK

Use the gateway with the Vercel AI SDK via an OpenAI-compatible provider.

Community / untested. The gateway is OpenAI-compatible, so this should work, but it is not part of the gateway's automated test suite.

Use the OpenAI-compatible provider and point it at the gateway base URL.

import { createOpenAICompatible } from '@ai-sdk/openai-compatible'
import { generateText } from 'ai'

const gateway = createOpenAICompatible({
  name: 'token-kiosk',
  baseURL: 'https://agent-router.gaib.ai/v1',
  apiKey: process.env.GATEWAY_API_KEY,
})

const { text } = await generateText({
  model: gateway('gemini/gemini-2.5-flash'),
  prompt: 'Hello!',
})

Streaming uses streamText as usual. thinking / reasoning_effort are not supported by the gateway.