FlowRunner
PricingContact
Theme
Start Free

Kimi

AI

Bring Kimi by Moonshot AI into your workflows. Agents run chat completions with very long context windows, native tool calling, and structured JSON output, extract text from PDFs and scanned documents server-side, and estimate token counts before sending long prompts.

9 actions API key available
Kimi website ↗ Platform Documentation ↗ Capability data verified 2026-07-25
A signed vendor contract lands in the contracts folder
Extract Text From File pulls the complete text server-side, with OCR handling the scanned pages
Estimate Token Count sizes the document and the flow picks the smallest context window that fits it
Chat Completion with a json_schema response format extracts parties, term, renewal window, liability caps, and obligations
The agent validates the extraction: required fields present, dates that parse, values inside sanity ranges
The structured summary posts to the legal channel with the source clause quoted beside each extracted field
Counsel confirms the renewal and termination terms before they enter the obligations calendar

What This Integration Enables

Most document automation fails at the chunking step. Splitting a long document to fit a small context window severs the cross-references that make documents mean what they mean: the defined term, the exception two sections later, the amendment that overrides the clause you extracted. Kimi's answer is a context window large enough that you stop chunking: the moonshot-v1 family runs to 128K tokens and the kimi-k flagships extend far beyond, paired with a server-side extraction pipeline that turns PDFs, Office documents, and scanned images into model-ready text. This connector gives FlowRunner agents the whole toolkit, plus the unglamorous action that makes it operationally sane: a token estimator that prices the prompt before anything is spent. - Run multi-turn chat with native tool calling, structured json_object and json_schema outputs, and very long inputs - Turn documents into text in one step, OCR included, with the uploaded file cleaned up automatically - Keep extracted files stored for reuse, or audit and remove them deliberately - Count tokens for the exact model you intend to call, without consuming completion tokens - Discover which models the key can reach, from context-sized variants to vision-capable previews Long context makes whole-document reasoning possible; it does not make the conclusions trustworthy on their own. In FlowRunner flows, what the model extracts becomes a proposal, and the [human-in-the-loop](/concepts/human-in-the-loop) step decides what the business commits to.

Without FlowRunner

Documents read in slices The chunking pipeline splits the contract, and the clause on page 41 loses the definition it depends on from page 3
Scanned means invisible The documents that matter most are the old ones, and the old ones are images
Context errors in production The prompt that was too long is discovered when the flow fails at 2am

With FlowRunner

Documents read whole Long-context models take the entire contract, transcript, or codebase in a single pass
OCR built into intake PDFs, Office files, and scans become model-ready text in one action
Prompts pre-flighted Token counts are checked before spending, and the model is sized to the document

Use Case Scenarios

The contract that gets read entirely, every time

A new agreement in [Dropbox](/integrations/dropbox-service) flows through Extract Text From File and into Chat Completion as one uninterrupted text, so the indemnification clause is read with its defined terms intact. The json_schema output lands the key terms in the tracker, the quoted clauses go to [Slack](/integrations/slack) for counsel's confirmation, and the renewal date enters the calendar only after a person agrees the model read it right.

Invoice fields from whatever arrives

Attachments from [Gmail](/integrations/gmail-service) arrive as native PDFs, Word files, and phone-photographed scans. Extract Text From File normalizes all of it, OCR included, and Chat Completion with a json_schema pulls vendor, amount, date, and line items into [Google Sheets](/integrations/google-sheets). The format lottery of a real inbox stops determining whether the data gets captured.

A research agent with a long memory

An agent loop built on Chat Completion carries tool definitions; Kimi returns tool_calls, FlowRunner executes them against connected systems, and the results feed back as tool-role messages. Because the context window is measured in hundreds of pages, the full transcript of a long investigation stays in view rather than being summarized away. Before each cycle, Estimate Token Count checks the assembled prompt and routes to moonshot-v1-32k or moonshot-v1-128k accordingly, paying for the big window only when the conversation has earned it.

Human-in-Loop Highlight

Kimi prices context honestly: with the moonshot-v1 variants you pay for the window you pick, and the difference between running 500 archived contracts through moonshot-v1-32k and running them all through a 128K flagship is a multiple on the invoice, not a rounding error. So batch document runs in FlowRunner budget before they spend. The agent pre-flights the corpus with Estimate Token Count, buckets the documents by size, and presents the plan: "412 of 500 contracts fit 32K; 61 need 128K; 27 exceed even that and need the kimi-k flagship. Estimated spend at each tier attached. Approve the mix?" A person signs off before the first Chat Completion fires, because a per-document decision made 500 times is a budget decision made once. Delete File carries the other gate: it permanently removes an uploaded document and its extracted text, so cleanup sweeps list what Get File Content would lose before anyone confirms.

Agent processes routinely
Detects exception requiring judgment
Clear match Continues automatically
Ambiguous Routes to human via preferred channel
Human decides
Agent resumes with decision

Agent Capabilities

9 actions

Chat

2
  • Ask Kimi Sends a single prompt and returns just the assistant's text, with an optional system prompt and a JSON mode forcing valid JSON output. The convenience action for one-shot steps over extracted documents.
  • Chat Completion Sends a full OpenAI-compatible messages array with system, user, assistant, and tool roles. Built for very long context, with native tool calling that returns tool_calls for the flow to execute, structured output via json_object or json_schema, multiple candidates, stop sequences, and penalties. Returns the raw response with token usage.

Tokens

1
  • Estimate Token Count Calculates how many tokens a messages array will consume for a given model, without running a completion. The pre-flight that sizes documents to context windows and prices batches before they run.

Models

1
  • List Models Lists every model the API key can call with its ID and owning organization, typically the kimi-k flagships, the context-sized moonshot-v1-8k, moonshot-v1-32k, and moonshot-v1-128k variants, and their vision-preview counterparts.

Files

5
  • Upload File Downloads a file from a URL and uploads it to Kimi for server-side extraction, returning the stored file object with its ID and processing status. The first half of the two-step extraction path.
  • Get File Content Retrieves the text Kimi extracted from an uploaded file by ID, ready to insert into a message for document Q&A or data extraction.
  • Extract Text From File The one-step path: downloads, uploads, extracts, and returns the parsed text, with OCR applied to PDFs and images. Deletes the uploaded file afterward by default so extraction leaves no storage residue; disable that to keep the file ID for reuse.
  • List Files Lists the files stored in the account with ID, name, size, upload time, purpose, and extraction status. The audit before any cleanup.
  • Delete File Permanently removes an uploaded file by ID, freeing its storage and making its extracted content unavailable. Cannot be undone, so it runs only after a person confirms nothing still needs the text.

Frequently Asked Questions

What can FlowRunner do with Kimi?

FlowRunner agents can run Chat Completion, Ask Kimi, and Estimate Token Count in Kimi, plus 6 more actions.

Does connecting Kimi to FlowRunner require OAuth?

No. Kimi connects to FlowRunner with an API key, no OAuth flow required.

Can Kimi trigger a FlowRunner workflow automatically?

Kimi doesn't currently expose triggers in FlowRunner. It connects as an action step inside workflows started by another trigger.

Start building with Kimi

$100 in credits. No card required. Connect in minutes.