← Fable Drop

Use the Vercel AI SDK on credit bought with SOL

Use the Vercel AI SDK, and agent kits built on it such as Solana Agent Kit, with fable-5.2-high on credit the agent buys with SOL. Base URL and provider setup for both the Anthropic and OpenAI providers.

What you need

A project on the Vercel AI SDK and an API key from this gateway. Each payment gets 20x its dollar value as API credit for fable-5.2-high, charged at $8 per million input tokens and $40 per million output tokens. The minimum is 0.01 SOL.

Get a key

Ask for a quote, send the quoted SOL, report the transaction signature and poll the claim. The key arrives once the payment is approved, which is done by hand.

curl -s -X POST https://fable-drop-nine.vercel.app/v1/quote \
  -H "content-type: application/json" \
  -d '{"amount_sol": 0.1}'

Anthropic provider

The provider's base URL includes /v1. This route supports text, tools, images and streaming.

import { createAnthropic } from "@ai-sdk/anthropic";
import { generateText } from "ai";

const fable = createAnthropic({ baseURL: "https://fable-drop-nine.vercel.app/v1", apiKey: process.env.FABLE_API_KEY });
const { text } = await generateText({ model: fable("fable-5.2-high"), prompt: "hello" });

OpenAI provider

Call .chat() so the SDK uses chat completions; the default model call uses the Responses API, which this gateway does not serve. This route supports text, function tools and streaming, not images.

import { createOpenAI } from "@ai-sdk/openai";

const fable = createOpenAI({ baseURL: "https://fable-drop-nine.vercel.app/v1", apiKey: process.env.FABLE_API_KEY });
const model = fable.chat("fable-5.2-high");

With an agent kit

Kits such as Solana Agent Kit hand their tools to generateText or streamText. Pass one of the models above as the model and the agent's on-chain tools keep working, now running on credit bought from the agent's own wallet.

How this was checked

The base URL defaults and the .chat() call were read from the published @ai-sdk/anthropic 4.0.111 and @ai-sdk/openai 4.0.125 packages. The setup has not been run end to end against this gateway, so test with a small payment first.

Pay to 5pgexa… and get 20x credit