ModaTransform

Documentation

Overview

Document APIs and embeddable editors for your application.

Moda Transform provides six APIs: Parse, Extract, Index, Convert, Generate, and Embed. Use them to read document data, make an archive searchable, change document formats, create files from structured input, or add an editor to your app.

Choose an API

Which operation do I need?

Use Parse to read one whole document, or Extract when you only need particular fields or content. Choose Index when the unit of work is a whole archive rather than a file, and you need to search it or ask questions across it.

Choose Convert when you already have a file and need another representation. Choose Generate when your application supplies the document’s content and structure. Use Embed when users need to edit inside your application.

Using the examples

The request and response examples on these pages define a proposed Transform API contract. The endpoint paths and field names are drafts for the beta API.

Examples use https://api.moda.app with a server-side MODA_API_KEY. A file_ref identifies an uploaded file; replace sample references such as file_report_pdf with your own. URLs on files.example.com stand in for returned download URLs.

Document job lifecycle

Parse, Extract, Convert, Generate, and indexing a collection share an asynchronous job model. A POST returns 202 Accepted with a job ID and polling URL:

Job acceptedJSON
{
  "id": "job_convert_example",
  "status": "queued",
  "poll_url": "/v1/documents/jobs/job_convert_example",
  "retry_after_ms": 1000
}

Poll the job with the same API key. Wait at least retry_after_ms between requests while the job is queued or running.

Poll a jobcURL
curl https://api.moda.app/v1/documents/jobs/job_convert_example \
  -H "Authorization: Bearer $MODA_API_KEY"
  • queued or running: the job is still processing.
  • completed: read the operation-specific result.
  • failed: inspect error; no successful result is returned.

Check result.warnings before using a completed result. A job may finish while reporting content that could not be processed as expected.

Failed jobJSON
{
  "id": "job_convert_example",
  "status": "failed",
  "error": {
    "code": "unsupported_conversion",
    "message": "This input and output format pair is not supported."
  }
}

Two operations respond directly instead of starting a job. Index search and ask return their results in the response, and Embed returns a session. For Embed, your backend creates the session and returns the editor URL to your application.

Beta access

These pages describe Transform’s core capabilities. Contact us for access, integration details, and availability for your document formats.