Feedra API
Use every Feedra model from your own code, scripts and tools with the OpenAI SDKs you already have. Billing comes from your Feedra plan and credits, the same as the apps.
Base URL: https://api.feedra.ai/openai/v1 Key: create one under Account → API keys in the app (it starts with fd_). Keep it secret.
Quick start
from openai import OpenAI
client = OpenAI(base_url="https://api.feedra.ai/openai/v1", api_key="fd_...")
r = client.chat.completions.create(model="auto", messages=[{"role": "user", "content": "Write a haiku about hay"}])
print(r.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.feedra.ai/openai/v1", apiKey: process.env.FEEDRA_KEY });
const stream = await client.chat.completions.create({ model: "claude-sonnet-5-5", stream: true, messages: [{ role: "user", content: "Hello" }] });
for await (const chunk of stream) process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
curl https://api.feedra.ai/openai/v1/chat/completions -H "Authorization: Bearer $FEEDRA_KEY" -H "Content-Type: application/json" \
-d '{"model":"auto","messages":[{"role":"user","content":"Hi"}]}'
Endpoints
GET /models | The models your plan can use, plus auto |
|---|---|
POST /chat/completions | Chat. Supports stream, stream_options.include_usage, max_tokens / max_completion_tokens, system and developer messages, and images (image_url parts with a data URL or a public https URL) |
Models: auto picks a fast model for easy questions and a strong one for hard ones. Or name any model from GET /models, for example claude-sonnet-5-5, gpt-6-luna or gemini-3.1-flash-lite.
Web search (Feedra extra): add "web_search": true to let models that support it search the web.
Usage: each response's usage includes feedra_credits, the credits it used.
Not yet supported: function calling (tools), embeddings, audio and image generation endpoints. Requests with tools get a clear 400 error.
Evals
Build eval suites in the app (Evals): a prompt with {{variables}}, test cases, and checks: contains, not_contains, equals, regex, json (optionally with required keys), max_words, and ai (a grader model judges each answer against your rubric). Run them across up to 6 models and compare pass rates, speed and cost.
Run one from CI with the CLI. It exits with status 1 if any model passes less than --min (default: every case):
FEEDRA_API_KEY=fd_... npx feedra eval "Support replies" --models claude-sonnet-5-5 --min 0.9
GitHub Actions:
- run: npx -y feedra eval "Support replies" --min 0.9
env:
FEEDRA_API_KEY: ${{ secrets.FEEDRA_API_KEY }}
Or call the API: GET /v1/evals/suites, POST /v1/evals/suites/{id}/run (body {"models": [...]}, optional), then poll GET /v1/evals/runs/{id} until status isn't running. The run has summary (per model: passed, total, avgMs, credits) and results (every answer with its checks). One run makes up to 600 model calls.
Agents
Scheduled agents can be managed and triggered with an API key too.
GET /v1/agentslists them, with your plan's limits.POST /v1/agentscreates one:{"name", "instructions", "model": "auto", "schedule": {"kind": "daily", "time": "08:00", "days": [1,2,3,4,5]} | {"kind": "hourly", "every": 4}, "timezone": "America/Chicago", "webSearch": true, "mcp": [connection ids], "deliver": {"push": true, "email": false}, "enabled": true}.daysuses 0 for Sunday; leave it out for every day.PUT /v1/agents/:idreplaces it;DELETE /v1/agents/:idremoves it.POST /v1/agents/:id/runruns it now (202). Add?wait=1to wait and get{"run": {"status", "output", "credits", "model"}}.GET /v1/agents/:id/runsreturns the last 30 runs.
Webhooks
Add endpoints in Account → Webhooks or with POST /v1/webhooks {"url", "events": ["*"] or a list, "description"}. The response includes the signing secret once; GET /v1/webhooks/:id/secret shows it again (from the app only).
Events: agent.run.completed, agent.run.failed, eval.run.completed, github.review.completed, vps.app.deployed, vps.app.failed, domain.registered, trade.order.placed, and ping from Send test. Each POST body is {"id", "type", "created", "data"}. Answer with any 2xx within 15 seconds.
Every request has an X-Feedra-Signature: t=<unix time>,v1=<hex> header, where v1 is the HMAC-SHA256 of <t>.<raw body> using your secret. Reject requests whose t is more than 5 minutes old, and use the event id to ignore repeats.
import { createHmac, timingSafeEqual } from "node:crypto";
function verify(raw, header, secret) {
const { t, v1 } = Object.fromEntries(header.split(",").map((p) => p.split("=")));
if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const want = createHmac("sha256", secret).update(`${t}.${raw}`).digest("hex");
return v1.length === want.length && timingSafeEqual(Buffer.from(v1), Buffer.from(want));
}
Failed deliveries are retried after 1, 5, 30, 120, 360 and 720 minutes. After 20 failures in a row the endpoint is turned off; turn it back on in the app or with PUT /v1/webhooks/:id and "enabled": true.
SEO
POST /v1/seo/audits{"url"}starts an audit (202,{"siteId", "auditId"});GET /v1/seo/audits/:idreturns progress, then the score, issues, pages with suggested fixes, site files and keyword ideas.GET /v1/seo/audits/:id/files/robots.txtand/sitemap.xmldownload the generated files.GET /v1/seolists your sites with their latest score.- Applying fixes to a site and connecting WordPress, Shopify or Google are done in the app.
Markets
GET /v1/markets/quotes?symbols=AAPL,BTCreturns{"quotes": [{"symbol", "name", "price", "change", "changePct", "high", "low", "prevClose", "volume", "time", "source": {"name", "url", "note"}}], "errors": [...]}. Crypto comes from CoinGecko; stocks come through your TradeStation account if connected.GET /v1/markets/bars?symbol=AAPL&range=1Mreturns up to 120 points; ranges are1D 5D 1M 3M 6M 1Y 5Y.- With TradeStation connected:
GET /v1/tradestation(accounts and balances),GET /v1/tradestation/positions,GET /v1/tradestation/orders(add?account=to pick one).
Show the source.note next to any prices you display. Market data is for your own use, not for redistribution. Orders can't be placed through the API: they're drafted in chat and confirmed in the Feedra app.
Your own provider keys
If you've added your own provider key (Account → Your API keys), requests to that provider's models run on your key: usage.feedra_credits is 0, and /models also lists the models your key unlocks. If the provider rejects your key, you get a 400 with code provider_key_rejected; Feedra doesn't switch to its own key.
Errors
Errors use OpenAI's shape: {"error": {"message": "...", "type": "...", "code": "..."}}. 401 means a bad key, 403 a model your plan doesn't include, 404 an unknown model, and 429 that you're out of credits or sending too fast (120 requests a minute).
Use it in your tools
Anything that lets you set an OpenAI base URL works. Examples:
- Continue / Cursor / Zed / LibreChat / Open WebUI: add an OpenAI-compatible provider with the base URL above, your
fd_key, and modelauto. - LangChain:
ChatOpenAI(base_url="https://api.feedra.ai/openai/v1", api_key="fd_...", model="auto"). - JetBrains IDEs (IntelliJ, PyCharm, WebStorm, Rider…): in Settings → Tools → AI Assistant → Models, turn on the OpenAI-compatible provider with the base URL above and your key, or install the Continue plugin and add Feedra as an OpenAI provider.
Command line
npm install -g feedra
feedra login # paste your fd_ key
feedra "how do I reverse a list in Go?"
cat crash.log | feedra "what went wrong?"
git diff | feedra "write a commit message"
feedra chat -m claude-sonnet-5-5 # interactive
feedra deploy ./my-site # deploy a folder to your Feedra server
feedra logs my-site
feedra domains ranchero coffee
In CI, set FEEDRA_API_KEY instead of running feedra login.
VS Code
Install Feedra AI from the VS Code Marketplace (or download the .vsix and use Extensions → … → Install from VSIX). Run Feedra: Sign in with API key. Then:
- chat in the Feedra side bar;
- right-click code → Feedra → Ask, Explain, Fix or Write tests (Fix shows the change and asks before applying it);
- Write a commit message from the Source Control bar;
- Feedra: Deploy this folder to my server.
MCP
Feedra speaks the Model Context Protocol both ways.
Use Feedra from other apps
Feedra is an MCP server at https://api.feedra.ai/mcp (Streamable HTTP). Authenticate with an API key as a Bearer token. Tools:
ask_model: ask any model on your plan (orauto) and get the answer; uses your credits.list_models.list_servers,server_options,app_details,app_logs,list_domains,domain_search: look at your Feedra servers, apps and domains.propose_…(deploy, restart, resize, buy or connect a domain…): nothing changes from the other app. You get a link to a Confirm page in Feedra, and it happens only when you confirm there.
Claude Code:
claude mcp add --transport http feedra https://api.feedra.ai/mcp --header "Authorization: Bearer fd_..."
Cursor (~/.cursor/mcp.json) and VS Code (.vscode/mcp.json, use "servers" and add "type": "http"):
{ "mcpServers": { "feedra": { "url": "https://api.feedra.ai/mcp", "headers": { "Authorization": "Bearer fd_..." } } } }
Claude Desktop (claude_desktop_config.json), through the mcp-remote bridge:
{ "mcpServers": { "feedra": { "command": "npx", "args": ["-y", "mcp-remote", "https://api.feedra.ai/mcp", "--header", "Authorization:Bearer fd_..."] } } }
Connect MCP servers to Feedra chat
In the app, Account → Connected tools (MCP) → Connect an MCP server. Paste the server's URL (remote servers only: Streamable HTTP). If it uses sign-in (OAuth), Feedra opens it in your browser; if it gave you a token, paste it in the token field. Claude then uses the server's tools in your chats.
- Ask before changes (default): tools that read run right away; tools that might change something show a Confirm card first. You can switch a server to Always ask or Never ask.
- Tools are used by Claude models (and by Auto when you mention the server). If you picked another model, it answers without tools.
- Feedra keeps tokens encrypted and never shows them again. Only connect servers you trust.