API referenceJobs
Create an asynchronous compile job
POST
Accepts the same bodies as /v1/compile and returns immediately with a job you can poll, stream (/events) or get notified about through options.webhookUrl.
bearerAuthheader
AuthorizationBearer <token>A personal API token (lta_...) from the dashboard or latex-api auth login. Also accepted in the X-API-Key header.
engine?stringentrypoint?stringtimeoutMs?stringbibliography?stringforce?string- body
files*array<>Items
1 <= items <= 1000entrypoint?stringMain .tex file. Guessed when there is a single .tex or a main.tex.
engine?EngineTeX engine. Detected from a % !TEX program = ... magic comment when omitted; defaults to pdflatex.
Value in
"pdflatex""xelatex""lualatex"options?Job accepted (or served from cache, in which case it is already finished).
application/json- response
job*curl -X POST 'https://latex-api.crafter.run/v1/jobs' \ -H 'Content-Type: application/json' \ -d '{ "files": [ { "path": "string", "content": "string" } ]}'Example Response
{ "job": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "queued", "mode": "sync", "engine": "pdflatex", "entrypoint": "string", "templateId": "string", "createdAt": "2019-08-24T14:15:22Z", "startedAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z", "expiresAt": "2019-08-24T14:15:22Z", "options": { "timeoutMs": 0, "bibliography": "auto", "webhookUrl": "string" }, "result": { "cached": true, "durationMs": 0, "exitCode": 0, "errors": 0, "warnings": 0, "pages": 0, "pdfBytes": 0, "pdfUrl": "string", "logUrl": "string", "diagnostics": [ { "severity": "error", "message": "string", "file": "string", "line": 0, "context": "string", "source": "string" } ] }, "error": { "reason": "compile_failed", "message": "string" }, "links": { "self": "string", "events": "string", "pdf": "string", "log": "string" } }}