← Fable Drop

Run a LangChain agent on credit bought with SOL

Run a LangChain or LangGraph agent on fable-5.2-high with credit bought in SOL. The base_url, api_key and model settings for ChatOpenAI and ChatAnthropic.

What you need

A Python project on LangChain or LangGraph 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. Each payment is approved by the operator by hand, so the key is not instant.

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

ChatOpenAI

The base URL includes /v1. Leave use_responses_api unset so the client calls chat completions; this gateway does not serve the Responses API. This route supports text, function tools and streaming, not images.

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="fable-5.2-high",
    base_url="https://fable-drop-nine.vercel.app/v1",
    api_key="<api_key>",
)
print(llm.invoke("hello").content)

ChatAnthropic

The base URL has no /v1; the Anthropic client adds /v1/messages itself. This route supports text, tools, images and streaming.

from langchain_anthropic import ChatAnthropic

llm = ChatAnthropic(
    model="fable-5.2-high",
    base_url="https://fable-drop-nine.vercel.app",
    api_key="<api_key>",
    max_tokens=1024,
)

Check the setup before paying

Use the API key fable-test with either class. It returns a fixed reply in the real response format without calling the model and at no cost, so you can confirm the base URL and parsing first.

How this was checked

Both classes were run against this gateway with the fable-test key on langchain-openai 1.8.5 and langchain-anthropic 1.7.13: invoke and stream returned the fixed test reply. Tool calls and real model answers were not run this way, so start with a small payment.

Track what is left

A script or the agent can read remaining credit and top up before it runs out.

curl -s https://fable-drop-nine.vercel.app/v1/balance -H "x-api-key: <api_key>"
Pay to 5pgexa… and get 20x credit