SKILL
SKILL is the single integration playbook for Dragonfly APIs. It covers model invocation, buyer operations, seller operations, and management key automation in one page.
Model Invocation
Use the OpenAI-compatible /v1 surface for chat, embeddings, speech, and model discovery.
Buyer APIs
Manage buyer API keys, routing profiles, usage, and billing from the /api account surface.
Seller APIs
Register provider keys, create listings, inspect admission or contract health, and review earnings.
Management Keys
Create scoped keys for operational automation without exposing your dashboard login.
Surface map
| Surface | Credential | Primary Use |
|---|---|---|
| /v1/chat/completions | Buyer key | Call chat models |
| /v1/embeddings | Buyer key | Create embeddings |
| /v1/audio/speech | Buyer key | Generate speech or TTS |
| /api/keys + /api/routing/profiles | Dashboard auth | Manage buyer access and routing policy |
| /v1/pool/* + /v1/market/* | Seller auth | Manage seller supply, listings, contracts, and earnings |
| /api/management-keys | Dashboard auth | Issue scoped management keys for automation |
Auth Map
Choose the credential type by API surface. Do not reuse one token type across every route.
Buyer key
Format: sk-df-... Used on OpenAI-compatible inference routes under /v1/*.
Dashboard auth
Browser session or JWT used by dashboard account routes such as /api/keys, /api/usage, and /api/management-keys.
Seller auth
Used by seller-facing pool and market routes that manage supply, listings, contracts, and earnings.
Management key
Scoped operational key for automated account actions. Scope can be buyer, seller, or full.
Rule of thumb
Model Invocation
Dragonfly exposes an OpenAI-compatible /v1 interface. Most existing OpenAI SDK integrations only need a base URL change and a Dragonfly API key.
Call a model
/v1/chat/completionsimport OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://dragonfly-api.com/v1",
apiKey: "sk-df-YOUR_BUYER_KEY",
});
const response = await client.chat.completions.create({
model: "deepseek/deepseek-chat",
messages: [{ role: "user", content: "Explain Dragonfly routing." }],
});
console.log(response.choices[0].message.content);{
"id": "chatcmpl-123",
"model": "deepseek/deepseek-chat",
"choices": [
{
"message": {
"role": "assistant",
"content": "Dragonfly routes requests across eligible supply."
}
}
]
}Discover models
/v1/modelsCreate embeddings
/v1/embeddingsGenerate speech
/v1/audio/speechBuyer APIs
Buyer APIs cover access control, routing, usage inspection, and spend awareness.
API key lifecycle
Create, update, and revoke keys. Add key groups, monthly budgets, and IP allow or deny rules.
Routing profiles
Bind a routing profile to a key and express latency, throughput, price, provider, and fallback policy.
Usage visibility
Read aggregate usage, by-key usage, and daily usage trends.
Billing visibility
Read balance and transaction history before production traffic ramps up.
Buyer endpoint matrix
GET /api/keys
POST /api/keys
PATCH /api/keys/:id
DELETE /api/keys/:id
GET /api/routing/profiles
POST /api/routing/profiles
PATCH /api/routing/profiles/:id
GET /api/usage
GET /api/usage/by-key
GET /api/usage/daily
GET /api/billing/balance
GET /api/billing/transactionsSeller APIs
Seller APIs are split between provider key pool operations and market listing operations.
Provider pool
List provider options, submit provider keys, inspect current pool keys, and delete retired keys.
Listings
Create listings, update caps and price floors, confirm reviewed prices, or delete listings.
Admission and contracts
Inspect listing contracts, contract checks, probe admission, reverify degraded contracts, and unsuspend recovered contracts.
Earnings
Read earnings, summaries, monthly breakdowns, timeseries, reserve entries, and review queues.
Seller endpoint matrix
GET /v1/pool/providers
GET /v1/pool/keys
POST /v1/pool/keys
DELETE /v1/pool/keys/:id
GET /v1/market/listings
POST /v1/market/listings
PATCH /v1/market/listings/:id
DELETE /v1/market/listings/:id
POST /v1/market/listings/:id/confirm-price
GET /v1/market/listings/:id/contracts
GET /v1/market/contracts/:id/checks
POST /v1/market/contracts/:id/reverify
POST /v1/market/contracts/:id/unsuspend
POST /v1/market/listings/:id/probe
GET /v1/market/listings/:id/probe-runs
GET /v1/market/earnings
GET /v1/market/earnings/summary
GET /v1/market/earnings/timeseries
GET /v1/market/earnings/monthly
GET /v1/market/earnings/reserve
GET /v1/market/reviewsManagement Keys
Management keys are for programmatic account operations. They are not inference keys.
buyer scope
Read or manage buyer access, buyer keys, and routing profiles.
seller scope
Read or manage seller listings, seller operations, and earnings automation.
full scope
Use one key for both buyer and seller operational flows.
/api/management-keyscurl https://dragonfly-api.com/api/management-keys \
-H "Authorization: Bearer YOUR_DASHBOARD_JWT" \
-H "Content-Type: application/json" \
-d '{
"name": "seller-ops-bot",
"mgmt_scope": "seller"
}'Shown once
Workflows
These are the fastest end-to-end sequences for a buyer integration, a seller onboarding flow, and an automation setup.
Buyer flow
1. Sign in to the dashboard.
2. Create a buyer API key from /api/keys.
3. Optionally create a routing profile from /api/routing/profiles.
4. Call /v1/chat/completions with Bearer sk-df-...
5. Track spend from /api/usage and /api/billing/balance.Seller flow
1. Sign in as a seller account.
2. Submit an upstream provider key to /v1/pool/keys.
3. Create a listing at /v1/market/listings.
4. Review probe runs, contract checks, and price confirmation status.
5. Track payouts from /v1/market/earnings and /v1/market/earnings/summary.Automation flow
1. Create a management key with buyer, seller, or full scope.
2. Store the raw key in a secret manager.
3. Use the key only on operational automation routes.
4. Rotate or delete the key when the automation owner changes.