Seshat
Seshat overview
What Seshat does with a print file, how a call works, and what you pay for.
What Seshat is
Seshat is Rekhu's knower for print files. You call it from your own Laravel or Node.js app, through the rekhu/core or @rekhu/core package. It checks a file the way a prepress expert does, and it repairs what can be repaired.
Seshat checks a file against the order it is for, not against fixed rules. An A5 flyer with 3 mm bleed is a different job from an A4 poster without bleed, and the same file can be right for one and wrong for the other. So every check takes the file and the order together.
What it does
- Checks size, trim and bleed, the resolution of every picture as placed, RGB and spot colours, fonts, total ink, the number of pages, small text, thin lines, white set to overprint, transparency and text near the cut. See Checking files.
- Decides for each finding what should happen:
fix(Seshat repairs it),ask(the customer chooses),refuse(it cannot be printed as it is) ornote. - Explains the result to your customer, in their own language, when you ask for it.
- Fixes the file: bleed, size, trim box, CMYK, fonts, pictures made into print PDFs, and much more. See Fixing files.
- Draws a proof: a page as a picture with its trim, bleed and safe zone.
- Takes large files, up to 10 GB, in parts that resume after a break. See Large files.
- Checks every file for safety before it works on it. See File safety.
- Puts in missing fonts and fills templates with names, one copy per row. See Fonts and templates.
Every other task (a print profile, PDF/X, pages, merge, split, crop marks, imposition, pages as pictures) is in the task reference: Every task, with examples.
How a call works
You send the file once, with check or upload. Rekhu keeps it for a day and answers with a file_id. Every call after that (a fix, a preview, a second fix) takes the file_id, so the file is never sent twice.
use Rekhu\Core\Rekhu;
$order = ['width_mm' => 148, 'height_mm' => 210, 'bleed_mm' => 3, 'pages' => 2];
$check = Rekhu::seshat()->for($user)->check($request->file('artwork'), $order);
if ($check['status'] !== 'ok') {
$fixed = Rekhu::seshat()->for($user)->fix($check['file_id'], 'auto', $order);
Storage::put('print/'.$fixed['name'], Rekhu::seshat()->download($fixed['file_id']));
}
const seshat = rekhu.seshat({ user });
const order = { width_mm: 148, height_mm: 210, bleed_mm: 3, pages: 2 };
const check = await seshat.check(buffer, { name: 'flyer.pdf', order });
if (check.status !== 'ok') {
const fixed = await seshat.fix(check.file_id, 'auto', order);
await seshat.downloadTo(fixed.file_id, `print/${fixed.name}`);
}
Several fixes go in one call, in a sensible order, as one charge.
Where it runs
Checks and fixes run on Rekhu's own servers in the EU, without an AI model. A model is used only to write an explanation for your customer, and only when you ask for one with explain. Files are kept for a day and never used for training. See Privacy and data region.
Modules
Seshat has two modules, switched on per application by Rekhu:
| Module | What it covers |
|---|---|
preflight |
check, fix, preview, merge, split, render, templates and text positions |
ai_enhance |
improving one picture: upscale, extend, denoise, restore, remove a background and more |
modules() tells you which ones your key may use. It is free, so call it to decide what to show in your app.
Rekhu::seshat()->modules();
// ['modules' => ['preflight' => true, 'ai_enhance' => false], 'modes' => [...]]
await rekhu.seshat().modules();
// { modules: { preflight: true, ai_enhance: false }, modes: [...] }
A call to a module that is off is refused with ModuleNotEnabled. See Errors.
What it costs
Seshat is priced per file and per fix, paid from your Rekhu credit. The prices are in your account, which also shows what Seshat used. See Credit and usage.
| Charged | Free |
|---|---|
A file checked (seshat_check), up to 20 pages: every check, the explanation, the report and the proof of that file included. Each file of a ZIP is one. |
upload, uploadInParts, resumeUpload, abortUpload |
Each page beyond 20 of a checked file (seshat_page) |
codes(), fonts(), fontFile(), modules(), recipes |
Each fix made in the print-ready version (seshat_fix), at most 5 per fixed file |
A fix that changed nothing |
Extras (seshat_extra): plates, versions compared, pages as pictures, merge, split, text positions |
The report and proof of a file already checked |
A template: per copy that came out right (seshat_copy) |
Polling a job; a refused call, such as an unknown fix |
A picture improved with ai_enhance: per mode |
A file fixed, reported or previewed without a check first is charged as a checked file once.
Each answer carries meta.usage, one line per charged item with its cost, so your app can show or pass on the cost per customer.
Tip: the package also keeps every call in your own usage table (Laravel) or ledger (Node.js), with what Rekhu charged and your own price next to it. See The core package.
Next
- Installation: install the package, add the key and run the first check.
- Every task, with examples: what to send and what comes back, task by task.