Abundant
← back

Bring Your Own Key: Fireworks AI

$ whoami
Abundant Team
$ date
docs

Run Abundant tools on your own Fireworks AI account. Your key, your models, your billing.

Overview

With BYOK, every model call Abundant makes is sent to Fireworks using your FIREWORKS_API_KEY. Usage, rate limits, and spend appear in your Fireworks dashboard. Abundant never stores or proxies your key.

Fireworks serves an OpenAI-compatible API, so no extra SDK is required.

Quick start

# Install
uv pip install swegen

# Add your Fireworks key
export FIREWORKS_API_KEY=<fireworks-api-key>

# Generate a task from a merged PR, powered by Fireworks
swegen create --repo axios/axios --pr 7150 --provider fireworks

Installation

uv pip install swegen

Create an API key at app.fireworks.ai/api-keys, then set these environment variables:

export GITHUB_TOKEN=<gh-token>
export FIREWORKS_API_KEY=<fireworks-api-key>

Note: No other model provider keys are needed. Cloud sandbox environments (Daytona, E2B, Modal, etc.) still require their own API keys.

Configuration

Setting

Value

Provider

fireworks

Base URL (OpenAI-compatible)

https://api.fireworks.ai/inference/v1

Base URL (Anthropic-compatible)

https://api.fireworks.ai/inference

API key

FIREWORKS_API_KEY

Model ID format

accounts/fireworks/models/<model>

Set a default model with a flag or environment variable:

swegen create --repo <owner/repo> --pr <num> \
  --provider fireworks \
  --model accounts/fireworks/models/kimi-k3

export ABUNDANT_PROVIDER=fireworks
export ABUNDANT_MODEL=accounts/fireworks/models/kimi-k3

Options

Verify your key

curl https://api.fireworks.ai/inference/v1/chat/completions \
  -H "Authorization: Bearer $FIREWORKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "accounts/fireworks/models/kimi-k3",
    "messages": [{"role": "user", "content": "Say hi in one word."}]
  }'

A 200 response with a completion means you’re ready.

Using the SDK directly

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.fireworks.ai/inference/v1",
    api_key=os.environ["FIREWORKS_API_KEY"],
)

response = client.chat.completions.create(
    model="accounts/fireworks/models/kimi-k3",
    messages=[{"role": "user", "content": "Summarize this PR."}],
)
print(response.choices[0].message.content)

Troubleshooting

Security

$ _