Skip to main content
Every model is served from https://api.feyn.ai and called with the same workspace API key. As in the OpenAI API, each task has one route under /v1/, and the body’s model names the model; GET /v1/models lists the names your key may use. The older /pulpie/v1/extract and /multimatte/v1/cutout routes still work. Failed requests are not charged. See rate limits and credits.

Pulpie

Pulpie is a 210M-parameter extraction model. It reads a whole page and keeps only the main content: no navigation, ads, cookie banners or footers.

Pulpie request

Send JSON with exactly one of html or pdf_base64.
string
pulpie. Optional while Pulpie is the only extraction model.
string
The page HTML. Up to 7 MB.
string
Instead of html: a text PDF, base64-encoded. Base64 adds a third to the size and request bodies are capped at 8 MB, so keep the PDF under about 6 MB before encoding. Scans without a text layer are rejected.
To send a PDF, base64-encode the file as pdf_base64:

Pulpie response

string
The extracted content as HTML.
string
The same content as Markdown.
number
Model time for this request, in milliseconds.
object
Input and output sizes, block counts and any recovery warnings.

Pulpie pricing and limits

MultiMatte

MultiMatte is an 860M-parameter promptable matting model (SAM 3 with a LoRA). It returns an alpha matte, so hair, fur and soft edges stay soft.

MultiMatte request

string
multimatte. Optional while MultiMatte is the only cutout model.
string
required
The photo (JPEG, PNG, WebP or HEIC), base64-encoded. Up to 5 MB before encoding. Images with a side longer than 2048 px are downscaled first.
string
The object to keep, for example "the dog". Defaults to the main foreground subject.
A photo’s base64 is too long for one shell argument, so build the body on stdin:

MultiMatte response

The body is an RGBA PNG (image/png) at the input size, after any downscale.
header
Model time for this image, in milliseconds.
header
The prompt that was used, percent-encoded. Useful when you let it default.

MultiMatte pricing and limits

Jiffy

Jiffy 1.0 is a 27B decision model. Give it a state (an email, a ticket, a page, a JSON record) and any number of typed questions about it; it answers each one with a probability, not generated text. Jiffy speaks the System One API (POST /v1/systemone), the request and response shape TypeSafe’s Jev uses, so System One clients and SDKs work by changing the base URL to https://api.feyn.ai and the key. GET /v1/models lists jiffy-1.0 and jiffy-latest, in a TypeSafe-style models array as well as the OpenAI data list.

Jiffy request

string
jiffy-1.0, or jiffy-latest for the newest version. Defaults to jiffy-1.0.
string | object | array
What the questions are about. Text is used as it is; JSON is read in its compact form.
object
required
Up to 64 questions, keyed by your own names. Each one has a type and instructions (a string, object or array):
  • noul: a yes/no question or statement. Optional criteria {"true": "...", "false": "..."} say what each answer means.
  • choice: criteria maps each option’s name to its description (or null), 2 to 255 mutually exclusive options.
  • score: criteria is an array of 2 to 10 ordered levels, from the low end of the scale to the high end.

Jiffy response

object
One answer per question, under the same name. noul is the probability of yes. choice is the most likely option and probabilities sums to 1 over your options. score is the probability-weighted level number, with legend mapping levels back to your descriptions. confidence (Choice and Score) is computed from how spread out probabilities is, with the same formulas as TypeSafe’s.
number
The tokens you are charged for. Jiffy reads the state together with each question, so the state counts once per question. Output tokens are always 0.
header
Model time for this request, in milliseconds.

Jiffy pricing and limits

Invalid requests answer 422 with a detail list naming the field. A busy model answers 529; retry after a short delay (the TypeSafe SDKs do this for you). Failed requests are not charged.

Chat completions

The language models on your workspace answer POST /v1/chat/completions in the OpenAI Chat Completions format, so the official OpenAI SDKs work by changing the base URL and key. Set FEYN_CHAT_MODEL to a model ID from the list of models your key can call.
Streaming ("stream": true) works as it does with OpenAI.

Which models you can call

GET /v1/models lists the models your key may call right now:
Copy a model’s id from the response’s data array. It also lists the Jiffy models, which answer POST /v1/systemone rather than chat completions; they are repeated in a models array in TypeSafe’s shape. Models fine-tuned for your workspace are private: only your workspace sees them in this list or can call them. Any other workspace gets the same 404 as for an unknown model.

Routing

Requests that share a model and a prompt prefix go to the same replica, so long shared system prompts stay in that replica’s prefix cache. If a replica fails, the request is retried on another. To keep a record of what a model did, write each run as a trace.