@apicity/fireworks
v0.1.0
Published
Fireworks AI provider for chat completions, completions, and embeddings.
Downloads
308
Maintainers
Readme
@apicity/fireworks
Fireworks AI provider for chat completions, completions, and embeddings.
Installation
npm install @apicity/fireworks
# or
pnpm add @apicity/fireworksQuick Start
import { fireworks as createFireworks } from "@apicity/fireworks";
const fireworks = createFireworks({ apiKey: process.env.FIREWORKS_API_KEY! });Real-world example: rerank candidate passages, then stream a Llama 3.3 70B answer
Fireworks ships two inference surfaces that compose cleanly into a
lightweight RAG pipeline: a hosted cross-encoder reranker (qwen3-reranker-8b)
that scores a query against N candidate documents, and OpenAI-compatible
streaming chat completions on Llama 3.3 70B Instruct. The rerank is the
hard part — most providers only sell embeddings — and the streaming chat
is the cheap, fast tail. The two-step flow below mirrors
tests/integration/fireworks-rerank.test.ts
and
tests/integration/fireworks-stream.test.ts,
which replay against
tests/recordings/fireworks_626462085/rerank-basic_678261817/
and
tests/recordings/fireworks_626462085/chat-stream-hello_2801342443/,
so every score, token count, and SSE shape below comes straight from
the recorded HARs.
import { fireworks as createFireworks } from "@apicity/fireworks";
import type {
FireworksRerankResponse,
FireworksChatStreamChunk,
} from "@apicity/fireworks";
const fireworks = createFireworks({ apiKey: process.env.FIREWORKS_API_KEY! });
// 1. Cross-encoder rerank. The model sees the query and each document
// jointly (unlike embedding-based retrieval, which scores them
// independently), so it picks up phrasing-level signal that ANN
// search misses. `top_n` caps the response length; `return_documents:
// true` echoes the document text back inline so you can hand the
// top hit straight to a chat model without keeping a parallel
// id→text map.
const ranked: FireworksRerankResponse =
await fireworks.inference.v1.rerank({
model: "fireworks/qwen3-reranker-8b",
query: "What is the capital of France?",
documents: [
"Berlin is the capital of Germany.",
"Paris is the capital and largest city of France.",
"Madrid is the capital of Spain.",
],
top_n: 2,
return_documents: true,
});
// 2. The response is sorted descending by relevance_score. The score
// spread is huge — Paris ~0.96, Berlin ~0.0001, Madrid dropped — a
// near-four-orders-of-magnitude gap that a cosine-similarity
// retriever could never produce. `index` points back into the
// original `documents` array.
const top = ranked.data[0];
console.log(`#1: index=${top.index}, score=${top.relevance_score.toFixed(4)}`);
console.log(` "${top.document}"`);
// → "#1: index=1, score=0.9579"
// → "Paris is the capital and largest city of France."
console.log(`model=${ranked.model}, tokens=${ranked.usage.prompt_tokens}`);
// → "model=accounts/fireworks/models/qwen3-reranker-8b, tokens=261"
// 3. Stream a chat answer through Llama 3.3 70B Instruct. The recorded
// call below is a generic 'say hello' smoke test — independent from
// the rerank above — but the request shape is exactly what you'd
// send in production: drop `top.document` into a system message and
// the user's original question into the user turn.
// `temperature: 0` makes the output deterministic; `max_tokens: 64`
// caps the response. The streaming surface lives under
// `post.stream.*` and yields OpenAI-shaped
// `chat.completion.chunk` objects.
let answer = "";
let finish: string | null = null;
let totals = { prompt: 0, completion: 0 };
const stream = fireworks.post.stream.inference.v1.chat.completions({
model: "accounts/fireworks/models/llama-v3p3-70b-instruct",
messages: [{ role: "user", content: "Say hello in one sentence." }],
temperature: 0,
max_tokens: 64,
});
for await (const chunk of stream) {
// 4. Each delta carries one or two tokens of `content`. The FIRST
// delta carries `delta.role` and no content; the LAST delta has
// no content but `finish_reason: "stop"` and final `usage`.
// Read defensively — both fields are optional on every chunk.
const choice: FireworksChatStreamChunk["choices"][number] | undefined =
chunk.choices[0];
if (choice?.delta?.content) answer += choice.delta.content;
if (choice?.finish_reason) finish = choice.finish_reason;
if (chunk.usage) {
totals = {
prompt: chunk.usage.prompt_tokens,
completion: chunk.usage.completion_tokens,
};
}
}
console.log(answer);
// → "Hello, it's nice to meet you and I'm here to help with any questions or topics you'd like to discuss."
console.log(
`finish=${finish}, prompt=${totals.prompt}, completion=${totals.completion}`,
);
// → "finish=stop, prompt=41, completion=26"Notes
- The reranker is a cross-encoder, not an embedding model — it
computes query-document interaction directly, so it's substantially
more accurate than cosine similarity over independent embeddings,
but it doesn't scale to millions of candidates. The standard hybrid
is embedding-based ANN to fetch a top-100, then
qwen3-reranker-8bto refine to a top-3. Fireworks hosts both halves on the same domain (/v1/embeddingsfor the first stage,/v1/rerankfor the second). - Streaming chat chunks are OpenAI-compatible:
chat.completion.chunkwithchoices[].deltacarrying incremental content. Watchfinish_reasonto know whether you hit"stop","length", or"content_filter". Only the final chunk hasusagepopulated; intermediate chunks haveusage: null. Fireworks also surfaces a per-callfireworks-cached-prompt-tokensresponse header — at 40 of 41 cached above, the prefix paid for itself almost entirely, visible without parsing the body. - For Anthropic-shaped responses against the same Llama catalog, swap
to
fireworks.inference.v1.messages({...}). The model id and pricing match, but the response is{ role, content: [{ type: "text", text }], ... }instead of{ choices: [{ message: { content }}] }— useful when porting code already written against@apicity/anthropic. - For non-streaming completions, drop the
post.stream.prefix:fireworks.inference.v1.chat.completions({...})returns a singleFireworksChatResponsewithchoices[0].message.contentpopulated and fullusagein one shot. Same payload schema, exposed atfireworks.inference.v1.chat.completions.schemafor runtime validation before the call. - Errors throw
FireworksErrorwithstatusand the parsed body attached.400from rerank usually means an empty/missingdocumentsarray;429is rate-limit;503is a deployment cold start. Wrap withwithRetry({ retries: 3 })from@apicity/fireworksto ride out cold deployments without bespoke retry code.
API Reference
101 endpoints across 1 group. Each method mirrors an upstream URL path.
inference
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/users/{userId}/apiKeys
const res = await fireworks.inference.v1.accounts.apiKeys.create({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
DELETE https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/users/{userId}/apiKeys:delete
const res = await fireworks.inference.v1.accounts.apiKeys({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/users/{userId}/apiKeys
const res = await fireworks.inference.v1.accounts.apiKeys.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/batchInferenceJobs
const res = await fireworks.inference.v1.accounts.batchInferenceJobs.create({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
DELETE https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/batchInferenceJobs/{jobId}
const res = await fireworks.inference.v1.accounts.batchInferenceJobs({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/batchInferenceJobs/{jobId}
const res = await fireworks.inference.v1.accounts.batchInferenceJobs({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/batchInferenceJobs
const res = await fireworks.inference.v1.accounts.batchInferenceJobs.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/datasets
const res = await fireworks.inference.v1.accounts.datasets.create({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
DELETE https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/datasets/{datasetId}
const res = await fireworks.inference.v1.accounts.datasets({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/datasets/{datasetId}
const res = await fireworks.inference.v1.accounts.datasets({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/datasets/{datasetId}:getDownloadEndpoint
const res = await fireworks.inference.v1.accounts.datasets.getDownloadEndpoint({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/datasets/{datasetId}:getUploadEndpoint
const res = await fireworks.inference.v1.accounts.datasets.getUploadEndpoint({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/datasets
const res = await fireworks.inference.v1.accounts.datasets.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
PATCH https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/datasets/{datasetId}
const res = await fireworks.inference.v1.accounts.datasets.update({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/datasets/{datasetId}:validateUpload
const res = await fireworks.inference.v1.accounts.datasets.validateUpload({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/deployedModels
const res = await fireworks.inference.v1.accounts.deployedModels.create({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
DELETE https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/deployedModels/{deployedModelId}
const res = await fireworks.inference.v1.accounts.deployedModels({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/deployedModels/{deployedModelId}
const res = await fireworks.inference.v1.accounts.deployedModels({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/deployedModels
const res = await fireworks.inference.v1.accounts.deployedModels.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
PATCH https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/deployedModels/{deployedModelId}
const res = await fireworks.inference.v1.accounts.deployedModels.update({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/deploymentShapes/{shapeId}
const res = await fireworks.inference.v1.accounts.deploymentShapes({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/deploymentShapes/{shapeId}/versions/{versionId}
const res = await fireworks.inference.v1.accounts.deploymentShapes.versions({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/deploymentShapes/{shapeId}/versions
const res = await fireworks.inference.v1.accounts.deploymentShapes.versions.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/deployments
const res = await fireworks.inference.v1.accounts.deployments.create({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
DELETE https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/deployments/{deploymentId}
const res = await fireworks.inference.v1.accounts.deployments({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/deployments/{deploymentId}
const res = await fireworks.inference.v1.accounts.deployments({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/deployments
const res = await fireworks.inference.v1.accounts.deployments.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
PATCH https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/deployments/{deploymentId}:scale
const res = await fireworks.inference.v1.accounts.deployments.scale({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/deployments/{deploymentId}:undelete
const res = await fireworks.inference.v1.accounts.deployments.undelete({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
PATCH https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/deployments/{deploymentId}
const res = await fireworks.inference.v1.accounts.deployments.update({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/dpoJobs
const res = await fireworks.inference.v1.accounts.dpoJobs.create({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
DELETE https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/dpoJobs/{jobId}
const res = await fireworks.inference.v1.accounts.dpoJobs({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/dpoJobs/{jobId}
const res = await fireworks.inference.v1.accounts.dpoJobs({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/dpoJobs/{jobId}:getMetricsFileEndpoint
const res = await fireworks.inference.v1.accounts.dpoJobs.getMetricsFileEndpoint({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/dpoJobs
const res = await fireworks.inference.v1.accounts.dpoJobs.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/dpoJobs/{jobId}:resume
const res = await fireworks.inference.v1.accounts.dpoJobs.resume({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/evaluationJobs
const res = await fireworks.inference.v1.accounts.evaluationJobs.create({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
DELETE https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/evaluationJobs/{evaluationJobId}
const res = await fireworks.inference.v1.accounts.evaluationJobs({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/evaluationJobs/{evaluationJobId}
const res = await fireworks.inference.v1.accounts.evaluationJobs({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/evaluationJobs/{evaluationJobId}:getExecutionLogEndpoint
const res = await fireworks.inference.v1.accounts.evaluationJobs.getExecutionLogEndpoint({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/evaluationJobs
const res = await fireworks.inference.v1.accounts.evaluationJobs.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/evaluatorsV2
const res = await fireworks.inference.v1.accounts.evaluators.create({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
DELETE https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/evaluators/{evaluatorId}
const res = await fireworks.inference.v1.accounts.evaluators({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/evaluators/{evaluatorId}
const res = await fireworks.inference.v1.accounts.evaluators({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/evaluators/{evaluatorId}:getBuildLogEndpoint
const res = await fireworks.inference.v1.accounts.evaluators.getBuildLogEndpoint({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/evaluators/{evaluatorId}:getSourceCodeSignedUrl
const res = await fireworks.inference.v1.accounts.evaluators.getSourceCodeSignedUrl({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/evaluators/{evaluatorId}:getUploadEndpoint
const res = await fireworks.inference.v1.accounts.evaluators.getUploadEndpoint({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/evaluators
const res = await fireworks.inference.v1.accounts.evaluators.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
PATCH https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/evaluators/{evaluatorId}
const res = await fireworks.inference.v1.accounts.evaluators.update({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/evaluators/{evaluatorId}:validateUpload
const res = await fireworks.inference.v1.accounts.evaluators.validateUpload({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}
const res = await fireworks.inference.v1.accounts({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts
const res = await fireworks.inference.v1.accounts.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/models
const res = await fireworks.inference.v1.accounts.models.create({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
DELETE https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/models/{modelId}
const res = await fireworks.inference.v1.accounts.models({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/models/{modelId}
const res = await fireworks.inference.v1.accounts.models({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/models/{modelId}:getDownloadEndpoint
const res = await fireworks.inference.v1.accounts.models.getDownloadEndpoint({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/models/{modelId}:getUploadEndpoint
const res = await fireworks.inference.v1.accounts.models.getUploadEndpoint({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/models
const res = await fireworks.inference.v1.accounts.models.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/models/{modelId}:prepare
const res = await fireworks.inference.v1.accounts.models.prepare({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
PATCH https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/models/{modelId}
const res = await fireworks.inference.v1.accounts.models.update({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/models/{modelId}:validateUpload
const res = await fireworks.inference.v1.accounts.models.validateUpload({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/reinforcementFineTuningJobs
const res = await fireworks.inference.v1.accounts.reinforcementFineTuningJobs.create({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
DELETE https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/reinforcementFineTuningJobs/{jobId}
const res = await fireworks.inference.v1.accounts.reinforcementFineTuningJobs({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/reinforcementFineTuningJobs/{jobId}
const res = await fireworks.inference.v1.accounts.reinforcementFineTuningJobs({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/reinforcementFineTuningJobs
const res = await fireworks.inference.v1.accounts.reinforcementFineTuningJobs.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/reinforcementFineTuningJobs/{jobId}:resume
const res = await fireworks.inference.v1.accounts.reinforcementFineTuningJobs.resume({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/rlorTrainerJobs
const res = await fireworks.inference.v1.accounts.rlorTrainerJobs.create({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
DELETE https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/rlorTrainerJobs/{jobId}
const res = await fireworks.inference.v1.accounts.rlorTrainerJobs({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/rlorTrainerJobs/{jobId}:executeTrainStep
const res = await fireworks.inference.v1.accounts.rlorTrainerJobs.executeTrainStep({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/rlorTrainerJobs/{jobId}
const res = await fireworks.inference.v1.accounts.rlorTrainerJobs({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/rlorTrainerJobs
const res = await fireworks.inference.v1.accounts.rlorTrainerJobs.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/rlorTrainerJobs/{jobId}:resume
const res = await fireworks.inference.v1.accounts.rlorTrainerJobs.resume({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/secrets
const res = await fireworks.inference.v1.accounts.secrets.create({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
DELETE https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/secrets/{secretId}
const res = await fireworks.inference.v1.accounts.secrets({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/secrets/{secretId}
const res = await fireworks.inference.v1.accounts.secrets({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/secrets
const res = await fireworks.inference.v1.accounts.secrets.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
PATCH https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/secrets/{secretId}
const res = await fireworks.inference.v1.accounts.secrets.update({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/supervisedFineTuningJobs
const res = await fireworks.inference.v1.accounts.supervisedFineTuningJobs.create({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
DELETE https://api.fireworks.ai/inference/v1/v1/accounts/{param}/supervisedFineTuningJobs/{param}
const res = await fireworks.inference.v1.accounts.supervisedFineTuningJobs({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{param}/supervisedFineTuningJobs/{param}
const res = await fireworks.inference.v1.accounts.supervisedFineTuningJobs({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/supervisedFineTuningJobs
const res = await fireworks.inference.v1.accounts.supervisedFineTuningJobs.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{param}/supervisedFineTuningJobs/{param}:resume
const res = await fireworks.inference.v1.accounts.supervisedFineTuningJobs.resume({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/users
const res = await fireworks.inference.v1.accounts.users.create({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/users/{userId}
const res = await fireworks.inference.v1.accounts.users({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/users
const res = await fireworks.inference.v1.accounts.users.list({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
PATCH https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/users/{userId}
const res = await fireworks.inference.v1.accounts.users.update({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
GET https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/batch_job/{batchId}
const res = await fireworks.inference.v1.audio.batch({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/audio/transcriptions
const res = await fireworks.inference.v1.audio.batch.transcriptions({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/audio/translations
const res = await fireworks.inference.v1.audio.batch.translations({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/audio/transcriptions
const res = await fireworks.inference.v1.audio.transcriptions({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/audio/translations
const res = await fireworks.inference.v1.audio.translations({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/chat/completions
const res = await fireworks.inference.v1.chat.completions({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/completions
const res = await fireworks.inference.v1.completions({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/embeddings
const res = await fireworks.inference.v1.embeddings({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/messages
const res = await fireworks.inference.v1.messages({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/rerank
const res = await fireworks.inference.v1.rerank({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/v1/accounts/{accountId}/users/{userId}
const res = await fireworks.inference.v1.accounts.users.update({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
const res = await fireworks.inference.v1.workflows.getResult({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
const res = await fireworks.inference.v1.workflows.kontext({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
const res = await fireworks.inference.v1.workflows.textToImage({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
POST https://api.fireworks.ai/inference/v1/messages
const res = await fireworks.inference.v1.messages({ /* ... */ });Source: packages/provider/fireworks/src/fireworks.ts
Middleware
import { fireworks as createFireworks, withRetry } from "@apicity/fireworks";
const fireworks = createFireworks({ apiKey: process.env.FIREWORKS_API_KEY! });
const models = withRetry(fireworks.get.v1.models, { retries: 3 });Part of the apicity monorepo.
License
MIT — see LICENSE.
