Faraatarjomeh API
Pages

For AI agents: this page as Markdown at https://faraatarjomeh.com/api/v1/docs/reference/ai-tools.md; all docs in one file at llms-full.txt.

API reference: AI tools

The AI tools endpoints (27 operations), generated from the OpenAPI document (https://faraatarjomeh.com/api/v1/openapi.json). For task-level walkthroughs use the guides; for error handling use /api/v1/docs/errors. The full reference: /api/v1/docs/reference.

At a glance#

Index#

AI tools#

Extras made from a finished translation: LinkedIn posts, proofreading, slides, mind map, summary, podcast, audiobook.

GET /api/v1/translate/{jobId}/tools/price#

Price the slides, mind map and LinkedIn posts

Free and makes no hold. Gives the Fara that POST /api/v1/translate/{jobId}/slides, /mindmap and /linkedin would hold now, from the same text. The price is an estimate: the charge is the actual cost, never more than this amount. Only while the price-first switch is on; while it is off the answer is 404 FEATURE_DISABLED. A tool with available: false is too short to make (no faraCharged). If no tool is usable the answer is 400, the same as the POSTs.

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).

Response 200

Field Type Required Notes
jobId string no
capped boolean no Always true: the charge never goes above the price shown.
tools object no
tools.slides object no
tools.slides.available boolean no
tools.slides.faraCharged number no Fara the POST would hold. 0 when the owner is not billed. Missing when available is false.
tools.mindmap object no
tools.mindmap.available boolean no
tools.mindmap.faraCharged number no Fara the POST would hold. 0 when the owner is not billed. Missing when available is false.
tools.linkedin object no
tools.linkedin.available boolean no
tools.linkedin.faraCharged number no Fara the POST would hold. 0 when the owner is not billed. Missing when available is false.

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/tools/price" \
  -H "Authorization: Bearer $FARA_API_KEY"

GET /api/v1/translate/{jobId}/linkedin#

Get saved LinkedIn posts

Returns the saved result, or saved: false when there is none yet.

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).

Response 200

LinkedInPosts

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/linkedin" \
  -H "Authorization: Bearer $FARA_API_KEY"

POST /api/v1/translate/{jobId}/linkedin#

Make LinkedIn posts from a finished translation

Synchronous; can take several minutes (up to 3 attempts of up to 10 minutes each). Fara is held first (402 INSUFFICIENT_CREDITS if too low), then the actual cost is charged (faraCost). If it fails, only work already done is charged. Each call makes a new result, replaces the saved one, and charges again: always send an Idempotency-Key. The result is saved and can be read again for free. Price first (only while the price-first switch is on): read the price with GET /api/v1/translate/{jobId}/tools/price. Send maxFara in the body to refuse a higher price: the answer is 409 PRICE_CHANGED with faraCharged, and nothing is held. The charge never goes above the hold; the answer has heldFara and refundedFara.

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Request body application/json

Field Type Required Notes
maxFara number no The most Fara you agree to pay (0 or more). Only read while the price-first switch is on. If the price is above it, the answer is 409 PRICE_CHANGED and nothing is held.

Response 200

LinkedInPosts

Responses

Example

curl
curl -sS -X POST "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/linkedin" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

DELETE /api/v1/translate/{jobId}/linkedin#

Delete saved LinkedIn posts

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Response 200

Responses

Example

curl
curl -sS -X DELETE "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/linkedin" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

GET /api/v1/translate/{jobId}/proofread#

Get saved proofreading suggestions

Returns the saved result, or saved: false when there is none yet.

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).

Response 200

Proofreading

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/proofread" \
  -H "Authorization: Bearer $FARA_API_KEY"

POST /api/v1/translate/{jobId}/proofread#

Make proofreading suggestions from a finished translation

Synchronous; can take several minutes (up to 3 attempts of up to 10 minutes each). Fara is held first (402 INSUFFICIENT_CREDITS if too low), then the actual cost is charged (faraCost). If it fails, only work already done is charged. Each call makes a new result, replaces the saved one, and charges again: always send an Idempotency-Key. The result is saved and can be read again for free. Switched off by default: while off it answers 503 FEATURE_DISABLED and nothing is held.

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Response 200

Proofreading

Responses

Example

curl
curl -sS -X POST "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/proofread" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

DELETE /api/v1/translate/{jobId}/proofread#

Delete saved proofreading suggestions

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Response 200

Responses

Example

curl
curl -sS -X DELETE "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/proofread" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

GET /api/v1/translate/slides/design-styles#

List slide design styles

Response 200

Field Type Required Notes
pptx object no
pdf object no
pricing object no

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/translate/slides/design-styles" \
  -H "Authorization: Bearer $FARA_API_KEY"

GET /api/v1/translate/{jobId}/slides#

Get saved slides

Returns the saved result, or saved: false when there is none yet.

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).

Response 200

Slides

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/slides" \
  -H "Authorization: Bearer $FARA_API_KEY"

POST /api/v1/translate/{jobId}/slides#

Make slides from a finished translation

Synchronous; can take several minutes (up to 3 attempts of up to 10 minutes each). Fara is held first (402 INSUFFICIENT_CREDITS if too low), then the actual cost is charged (faraCost). If it fails, only work already done is charged. Each call makes a new result, replaces the saved one, and charges again: always send an Idempotency-Key. The result is saved and can be read again for free. Price first (only while the price-first switch is on): read the price with GET /api/v1/translate/{jobId}/tools/price. Send maxFara in the body to refuse a higher price: the answer is 409 PRICE_CHANGED with faraCharged, and nothing is held. The charge never goes above the hold; the answer has heldFara and refundedFara.

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Request body application/json

Field Type Required Notes
maxFara number no The most Fara you agree to pay (0 or more). Only read while the price-first switch is on. If the price is above it, the answer is 409 PRICE_CHANGED and nothing is held.

Response 200

Slides

Responses

Example

curl
curl -sS -X POST "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/slides" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

DELETE /api/v1/translate/{jobId}/slides#

Delete saved slides

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Response 200

Responses

Example

curl
curl -sS -X DELETE "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/slides" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

POST /api/v1/translate/{jobId}/slides/generate-files#

Make PPTX and PDF files from saved slides

Free. Download them with GET /api/v1/translate/download/{jobId}/slides-pptx and slides-pdf.

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Request body application/json

SlidesFilesRequest

Response 200

SlidesFiles

Responses

Example

curl
curl -sS -X POST "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/slides/generate-files" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/v1/translate/mindmap/spec#

List mind map color sets

Response 200

Field Type Required Notes
colorHarmonies object[] no

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/translate/mindmap/spec" \
  -H "Authorization: Bearer $FARA_API_KEY"

GET /api/v1/translate/{jobId}/mindmap#

Get saved a mind map

Returns the saved result, or saved: false when there is none yet.

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).

Response 200

Mindmap

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/mindmap" \
  -H "Authorization: Bearer $FARA_API_KEY"

POST /api/v1/translate/{jobId}/mindmap#

Make a mind map from a finished translation

Synchronous; can take several minutes (up to 3 attempts of up to 10 minutes each). Fara is held first (402 INSUFFICIENT_CREDITS if too low), then the actual cost is charged (faraCost). If it fails, only work already done is charged. Each call makes a new result, replaces the saved one, and charges again: always send an Idempotency-Key. The result is saved and can be read again for free. Price first (only while the price-first switch is on): read the price with GET /api/v1/translate/{jobId}/tools/price. Send maxFara in the body to refuse a higher price: the answer is 409 PRICE_CHANGED with faraCharged, and nothing is held. The charge never goes above the hold; the answer has heldFara and refundedFara.

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Request body application/json

Field Type Required Notes
maxFara number no The most Fara you agree to pay (0 or more). Only read while the price-first switch is on. If the price is above it, the answer is 409 PRICE_CHANGED and nothing is held.

Response 200

Mindmap

Responses

Example

curl
curl -sS -X POST "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/mindmap" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

DELETE /api/v1/translate/{jobId}/mindmap#

Delete saved a mind map

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Response 200

Responses

Example

curl
curl -sS -X DELETE "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/mindmap" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

POST /api/v1/translate/{jobId}/mindmap/pdf#

Get the saved mind map as a PDF

Free. Returns the PDF directly.

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Request body application/json

MindmapPdfRequest

Responses

Example

curl
curl -sS -X POST "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/mindmap/pdf" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/v1/translate/{jobId}/summary#

Get the document summary

The Persian summary made during translation. Included in the translation price.

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).

Response 200

Digest

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/summary" \
  -H "Authorization: Bearer $FARA_API_KEY"

POST /api/v1/translate/{jobId}/summary#

Load the document summary

Same as GET, kept for older clients. Free; 404 when no summary exists.

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Response 200

Digest

Responses

Example

curl
curl -sS -X POST "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/summary" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

DELETE /api/v1/translate/{jobId}/summary#

Delete the saved summary

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Response 200

Responses

Example

curl
curl -sS -X DELETE "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/summary" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

GET /api/v1/translate/{jobId}/digest#

Get the document digest

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).

Response 200

Digest

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/digest" \
  -H "Authorization: Bearer $FARA_API_KEY"

GET /api/v1/translate/{jobId}/summary-card#

Get the summary card (PNG or PDF)

Free. A one-page card of the brief summary (brief in the digest answer). When the brief is not ready, answers 409 SUMMARY_NOT_READY and starts making it in the background: ask again in a few seconds.

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
format query string no Image format of the card. — one of: png, pdf; default: "png"

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/summary-card" \
  -H "Authorization: Bearer $FARA_API_KEY"

POST /api/v1/translate/{jobId}/summary/pdf#

Get the summary as a PDF

Free. Returns the PDF directly.

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Request body application/json

SummaryPdfRequest

Responses

Example

curl
curl -sS -X POST "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/summary/pdf" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/v1/translate/{jobId}/podcast#

Get the saved podcast

Make one with POST /api/v1/audio/jobs (feature: podcast).

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).

Response 200

AudioFeature

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/podcast" \
  -H "Authorization: Bearer $FARA_API_KEY"

DELETE /api/v1/translate/{jobId}/podcast#

Delete the saved podcast

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Response 200

Responses

Example

curl
curl -sS -X DELETE "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/podcast" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

GET /api/v1/translate/{jobId}/audiobook#

Get the saved audiobook

Make one with POST /api/v1/audio/jobs (feature: audiobook).

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).

Response 200

AudioFeature

Responses

Example

curl
curl -sS -X GET "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/audiobook" \
  -H "Authorization: Bearer $FARA_API_KEY"

DELETE /api/v1/translate/{jobId}/audiobook#

Delete the saved audiobook

Parameters

Name In Type Required Notes
jobId path string yes Translation job id (returned by analysis or upload).
Idempotency-Key header string no see /api/v1/docs/conventions#idempotency

Response 200

Responses

Example

curl
curl -sS -X DELETE "https://faraatarjomeh.com/api/v1/translate/$JOB_ID/audiobook" \
  -H "Authorization: Bearer $FARA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Schemas#

Named request and response objects used above. Nested objects are flattened as parent.child; arrays as parent[].child.

AudioFeature#

Field Type Required Notes
jobId string no
hasPodcast boolean no
hasAudiobook boolean no
title string no
text string no
audioFileId string | null no may be null
audioDownloadPath string no Where to download the audio.
audioContentType string no
audioExtension string no
metadata object no
processedAt string | null no may be null
savedAt string | null no may be null

Digest#

Field Type Required Notes
jobId string no
hasDigest boolean no
hasSummary boolean no
digest string no Persian summary text.
digestChars integer no
coverage string no full or partial.
truncated boolean no
status string | null no may be null
faraCost number no
billing string no
savedAt string | null no may be null
brief object | null no Short card: title, kind, summary, points (3 to 5 strings), takeaway, audience. Null until ready. — may be null
briefStatus string no ready, preparing (being made in the background now), or unavailable (could not be made). — one of: ready, preparing, unavailable

LinkedInPosts#

Field Type Required Notes
jobId string no
totalPosts integer no
processedAt string | null no may be null
posts object[] no
metadata object no
faraCost number no
billing string no
heldFara number no Fara held before the work. Only when the price-first switch is on, on the POST answer.
refundedFara number no Fara given back from the hold (held minus charged). Only when the price-first switch is on, on the POST answer.
saved boolean no
savedAt string | null no may be null
warning string no

Mindmap#

Field Type Required Notes
jobId string no
hasMindmap boolean no
title string no
root object | null no Root node. Each node has a label and children. — may be null
nodeCount integer no
metadata object no
faraCost number no
billing string no
heldFara number no Fara held before the work. Only when the price-first switch is on, on the POST answer.
refundedFara number no Fara given back from the hold (held minus charged). Only when the price-first switch is on, on the POST answer.
processedAt string | null no may be null
savedAt string | null no may be null

MindmapPdfRequest#

Field Type Required Notes
title string no
harmonyId string no Color set id from GET /api/v1/translate/mindmap/spec.

Proofreading#

Field Type Required Notes
jobId string no
hasProofreading boolean no
edits object | null no may be null
edits.vocabulary object[] no
edits.substitutions object[] no
edits.paragraphs object[] no
summary object | null no may be null
processedAt string | null no may be null
savedAt string | null no may be null
appliedAt string | null no may be null
faraCost number no
billing string no
saved boolean no

Slides#

Field Type Required Notes
jobId string no
hasSlides boolean no
slides object[] no
metadata object no
faraCost number no
billing string no
heldFara number no Fara held before the work. Only when the price-first switch is on, on the POST answer.
refundedFara number no Fara given back from the hold (held minus charged). Only when the price-first switch is on, on the POST answer.
processedAt string | null no may be null
savedAt string | null no may be null
pptxFileId string | null no may be null
slidesPdfFileId string | null no may be null
filesGeneratedAt string | null no may be null

SlidesFiles#

Field Type Required Notes
jobId string no
pptxFileId string no
slidesPdfFileId string no
styles object no
styles.pptxStyle string no
styles.pdfStyle string no
faraCost number no Always 0: making files is free.
pptxSize integer no
slidesPdfSize integer no
generated boolean no

SlidesFilesRequest#

Field Type Required Notes
pptxStyle string no Style id from GET /api/v1/translate/slides/design-styles (pptx.styles).
pdfStyle string no Style id from GET /api/v1/translate/slides/design-styles (pdf.styles).

SummaryPdfRequest#

Field Type Required Notes
styles object no Style options, as for custom PDFs.
title string no
showHeader boolean no