# Fireworks AI

> Run fast open models such as Kimi, DeepSeek, Qwen and GLM in your workflows. Have a model write or answer, sort text into categories, and pull data out of text and images; create embeddings and rank documents for semantic search; and keep an eye on spending.

App · AI Models · 9 actions. Web page: https://docs.lodol.com/docs/integrations/fireworks-ai

## Actions

### Ask a model

Send a prompt, and any pictures, to an open model on Fireworks and get its reply: write, summarize, translate, answer or describe an image.

**Inputs**

- Prompt (`prompt`, text, required): What to ask or tell the model.
- Model (`model`, text): The model that does the work. Kimi K2.6 reads images and suits most jobs. You can also type any model id, including your own fine-tuned models. Default: `accounts/fireworks/models/kimi-k2p6`.
- Instructions (`instructions`, text): How the model should behave, such as 'Answer in one short paragraph' or 'You are a friendly support agent for Acme'.
- Images (`images`, list): Pictures for the model to look at: upload them, pick files from an earlier step, or paste public web addresses. PNG, JPEG, GIF, BMP or TIFF, up to 30.
- Thinking (`thinking`, text): How much the model reasons before it answers. More is slower and uses more tokens; the thinking comes back separately from the reply. One of: `default` (Model's default), `none` (Off), `low`, `medium`, `high`. Default: `default`.
- Maximum reply length (`max_tokens`, number): The most tokens the reply may use; a token is about three-quarters of a word. Leave empty to let the model decide. At least 1.
- Creativity (`temperature`, number): From 0 (focused and repeatable) to 2 (most varied). Leave empty for the model's default. From 0 to 2.

**Outputs**

- `finish_reason` (text): stop when it finished, length when cut off.
- `input_tokens` (number): Tokens read, as billed.
- `model` (text): The model that answered.
- `output_tokens` (number): Tokens written, as billed.
- `reply` (text): The model's answer.
- `thinking` (text): Its reasoning, when it thought first.
- `total_tokens` (number): Both together.
- `was_cut_off` (true/false): Whether it hit the maximum reply length.

**Example output**

```json
{
  "finish_reason": "stop",
  "input_tokens": 212,
  "model": "accounts/fireworks/models/kimi-k2p6",
  "output_tokens": 9,
  "reply": "Paris.",
  "thinking": null,
  "total_tokens": 221,
  "was_cut_off": false
}
```

### Check the monthly spend limit

See this month's spending against the account's spend limit. Fireworks pauses every request once the limit is reached, so this makes a good first step before a large run.

**Inputs**: None.

**Outputs**

- `has_limit` (true/false): Whether a monthly limit is set.
- `highest_allowed_limit` (number): The highest limit the account's tier allows.
- `is_paused` (true/false): Whether the limit is reached and requests paused.
- `limit` (number): The limit, in dollars.
- `percent_used` (number): How much of the limit is used, from 0 to 100.
- `remaining` (number): Dollars left before the limit.
- `spent_this_month` (number): Spent so far this month, in dollars.

**Example output**

```json
{
  "has_limit": true,
  "highest_allowed_limit": 500,
  "is_paused": false,
  "limit": 500,
  "percent_used": 2.5,
  "remaining": 487.52,
  "spent_this_month": 12.48
}
```

### Create embeddings

Turn texts into vectors for semantic search, deduplication or clustering. Vectors come back at unit length, so a dot product of two is their cosine similarity.

**Inputs**

- Texts (`texts`, list, required): The texts to turn into vectors, one per entry. Each gives one vector, in the same order.
- Model (`model`, text): Qwen3 Embedding 8B is the best for search. Match the model already used for any vectors you will compare these with. One of: `fireworks/qwen3-embedding-8b` (Qwen3 Embedding 8B (recommended)), `nomic-ai/nomic-embed-text-v1.5` (Nomic Embed v1.5 (768 numbers)), `BAAI/bge-base-en-v1.5` (BGE Base English v1.5 (768 numbers)), `BAAI/bge-small-en-v1.5` (BGE Small English v1.5 (384 numbers)), `thenlper/gte-large` (GTE Large (1,024 numbers)), `mixedbread-ai/mxbai-embed-large-v1` (mxbai Embed Large v1 (1,024 numbers)). Default: `fireworks/qwen3-embedding-8b`.
- Vector length (`dimensions`, number): Shorter vectors take less storage. Only Qwen3 Embedding 8B (up to 4,096) and Nomic Embed v1.5 (up to 768) can be shortened; leave empty for the full length. At least 1.

**Outputs**

- `count` (number): How many vectors.
- `dimensions` (number): How many numbers each vector has.
- `embedding` (list): The first text's vector.
- `embeddings` (list): One vector per text, in the same order.
- `model` (text): The model used.
- `total_tokens` (number): Tokens billed.

**Example output**

```json
{
  "count": 2,
  "dimensions": 3,
  "embedding": [
    0.012,
    -0.043,
    0.031
  ],
  "embeddings": [
    [
      0.012,
      -0.043,
      0.031
    ],
    [
      0.018,
      -0.039,
      0.027
    ]
  ],
  "model": "fireworks/qwen3-embedding-8b",
  "total_tokens": 14
}
```

### Extract data

Pull the fields you name out of text or pictures, such as the total on a photographed receipt or the sender's company in an email, ready for a spreadsheet row or a CRM record.

**Inputs**

- Text (`text`, text): The text to pull the fields out of, such as an email or an invoice. Leave empty when the images hold everything.
- Images (`images`, list): Pictures for the model to look at: upload them, pick files from an earlier step, or paste public web addresses. PNG, JPEG, GIF, BMP or TIFF, up to 30.
- Fields (`fields`, list): The pieces of information you want, one per entry. Add what each means after a colon to steer it: 'total: the amount due in dollars'. A field the material does not mention comes back empty, never guessed.
- Instructions (`instructions`, text): Extra rules, such as 'Write dates as YYYY-MM-DD'.
- Model (`model`, text): The model that does the work. Kimi K2.6 reads images and suits most jobs. You can also type any model id, including your own fine-tuned models. Default: `accounts/fireworks/models/kimi-k2p6`.
- JSON Schema (advanced) (`json_schema`, text): Instead of 'Fields', paste a JSON Schema whose root is an object, for numbers, lists or nested fields. When set, 'Fields' is ignored.

**Outputs**

- `data` (object): The fields, by the names asked for.
- `found_fields` (list): The fields that were filled.
- `input_tokens` (number): Tokens read, as billed.
- `missing_fields` (list): The fields the material did not mention.
- `model` (text): The model that read it.
- `output_tokens` (number): Tokens written, as billed.
- `total_tokens` (number): Both together.

**Example output**

```json
{
  "data": {
    "invoice number": "INV-1042",
    "total": "$1,250.00",
    "vendor": "Acme Ltd"
  },
  "found_fields": [
    "invoice number",
    "vendor",
    "total"
  ],
  "input_tokens": 212,
  "missing_fields": [],
  "model": "accounts/fireworks/models/kimi-k2p6",
  "output_tokens": 9,
  "total_tokens": 221
}
```

### Get a model

Look up one model: what it is for, whether it reads images or calls tools, how much text it takes in, and when Fireworks plans to retire it.

**Inputs**

- Model (`model`, text, required): The model to look up. Pick one, or type its id, such as accounts/fireworks/models/kimi-k2p6.

**Outputs**

- `calls_tools` (true/false): Whether it can call tools.
- `context_length` (number): The most tokens it can take in at once.
- `created_at` (text): When it was added.
- `description` (text): What Fireworks says about it.
- `fine_tuned_from` (text): The model it was fine-tuned from, if it was.
- `hugging_face_url` (text): Its page on Hugging Face, when it has one.
- `id` (text): The model's id, to use in any Fireworks step.
- `name` (text): Its display name.
- `parameter_count` (number): How many parameters it has, when known.
- `reads_images` (true/false): Whether it can read pictures.
- `ready` (true/false): Whether it is ready to use (not still uploading).
- `retires_on` (text): The day Fireworks takes it off serverless, if set.
- `serverless` (true/false): Whether it runs on Fireworks' pay-per-token service.
- `type` (text): chat, embedding, reranker or other.

**Example output**

```json
{
  "calls_tools": true,
  "context_length": 262144,
  "created_at": "2026-04-20T17:00:00Z",
  "description": "Moonshot AI's open agentic model.",
  "fine_tuned_from": null,
  "hugging_face_url": "https://huggingface.co/moonshotai/Kimi-K2.6",
  "id": "accounts/fireworks/models/kimi-k2p6",
  "name": "Kimi K2.6",
  "parameter_count": 1000000000000,
  "reads_images": true,
  "ready": true,
  "retires_on": null,
  "serverless": true,
  "type": "chat"
}
```

### Get spending

See what Fireworks usage cost over a range of days, in US dollars, split by model, day, person or API key. Covers the whole account when the key belongs to an admin, otherwise your own usage.

**Inputs**

- From (`start_date`, date): The first day to include. Leave empty for the start of this month.
- To (`end_date`, date): The last day to include. Leave empty for today.
- Break down (`breakdown`, text): How to split the total. Days are UTC. One of: `model` (By model), `day` (By day), `day_model` (By day and model), `user` (By person), `api_key` (By API key), `total` (Just the total). Default: `model`.

**Outputs**

- `covers` (text): account for everyone's usage, you for yours.
- `currency` (text): Always USD.
- `end_date` (text): The last day.
- `row_count` (number): How many rows.
- `rows` (list): The total, split up.
- `start_date` (text): The first day.
- `total` (number): The total, in dollars.

**Example output**

```json
{
  "covers": "account",
  "currency": "USD",
  "end_date": "2026-09-23",
  "row_count": 1,
  "rows": [
    {
      "api_key_id": null,
      "cost": 12.48,
      "day": null,
      "model": "accounts/fireworks/models/kimi-k2p6",
      "user": null
    }
  ],
  "start_date": "2026-09-01",
  "total": 12.48
}
```

### List models

List the models you can use: Fireworks' ready-to-use ones, or the models uploaded or fine-tuned in your account. Each says whether it reads images and how much text it takes in.

**Inputs**

- Whose models (`source`, text): Fireworks' ready-to-use models, billed per token, or the models uploaded or fine-tuned in your account. One of: `serverless` (Ready to use on Fireworks), `account` (Your own models). Default: `serverless`.
- What it's for (`purpose`, text): Only models that do this. One of: `all` (Anything), `chat`, `vision` (Chat that reads images), `embedding` (Embeddings), `reranker` (Reranking). Default: `all`.
- Name contains (`search`, text): Only models whose name or id contains this, such as 'qwen'.

**Outputs**

- `count` (number): How many there are.
- `model_ids` (list): Every model's id, in the same order.
- `models` (list): The models, by name.

**Example output**

```json
{
  "count": 1,
  "model_ids": [
    "accounts/fireworks/models/kimi-k2p6"
  ],
  "models": [
    {
      "calls_tools": true,
      "context_length": 262144,
      "created_at": "2026-04-20T17:00:00Z",
      "description": "Moonshot AI's open agentic model.",
      "fine_tuned_from": null,
      "id": "accounts/fireworks/models/kimi-k2p6",
      "name": "Kimi K2.6",
      "reads_images": true,
      "ready": true,
      "retires_on": null,
      "serverless": true,
      "type": "chat"
    }
  ]
}
```

### Rank documents by relevance

Order a list of texts by how well each answers a question, best first, with a score from 0 to 1. Useful for picking the passages to hand an AI step.

**Inputs**

- Question (`query`, text, required): What you are looking for, written as a question or a search.
- Documents (`documents`, list, required): The texts to rank, one per entry.
- How many to return (`top_n`, number): Keep only the best matches. Leave empty to rank them all. At least 1.

**Outputs**

- `count` (number): How many were returned.
- `query` (text): The question.
- `results` (list): The documents, best match first.
- `top_document` (text): The best match's text.
- `top_position` (number): Where the best match was in the list, from 1.
- `top_score` (number): The best match's score, from 0 to 1.

**Example output**

```json
{
  "count": 2,
  "query": "What is the capital of France?",
  "results": [
    {
      "document": "Paris is the capital of France.",
      "position": 2,
      "rank": 1,
      "score": 0.98
    },
    {
      "document": "The Loire is France's longest river.",
      "position": 1,
      "rank": 2,
      "score": 0.07
    }
  ],
  "top_document": "Paris is the capital of France.",
  "top_position": 2,
  "top_score": 0.98
}
```

### Sort text into a category

Have a model pick the one category that fits a piece of text, such as routing a support email. The answer is always exactly one of the categories you list.

**Inputs**

- Text (`text`, text, required): The text to sort, such as an email, a review or a support ticket.
- Categories (`categories`, list, required): The categories to choose from, one per entry. The step always returns exactly one of them, spelled as you wrote it.
- How to decide (`instructions`, text): Rules for borderline cases, such as 'Anything that mentions money back is a Refund request'.
- Model (`model`, text): The model that does the work. Kimi K2.6 reads images and suits most jobs. You can also type any model id, including your own fine-tuned models. Default: `accounts/fireworks/models/kimi-k2p6`.

**Outputs**

- `categories` (list): The categories it chose from.
- `category` (text): The category chosen.
- `input_tokens` (number): Tokens read, as billed.
- `model` (text): The model that chose.
- `output_tokens` (number): Tokens written, as billed.
- `total_tokens` (number): Both together.

**Example output**

```json
{
  "categories": [
    "Refund request",
    "Bug report",
    "Sales question"
  ],
  "category": "Refund request",
  "input_tokens": 212,
  "model": "accounts/fireworks/models/kimi-k2p6",
  "output_tokens": 9,
  "total_tokens": 221
}
```
