Skip to main content
POST
/
v1
/
run
/
generations
Doc2X V3 PDF Conversion
curl --request POST \
  --url https://api.foxapi.cc/v1/run/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "doc2x-v3",
  "pdf_url": "https://example.com/document.pdf",
  "page_count": 10,
  "convert_mode": "md",
  "formula_mode": "normal",
  "filename": "output",
  "merge_cross_page_forms": false
}
'
{
  "created": 1757165031,
  "id": "task-unified-1757165031-uyujaw3d",
  "model": "<string>",
  "object": "document.generation.task",
  "progress": 0,
  "status": "pending",
  "task_info": {
    "can_cancel": true,
    "estimated_time": 45
  },
  "type": "document"
}

Authorizations

Authorization
string
header
required

All endpoints require Bearer Token authentication

Add the following to your request header:

Authorization: Bearer YOUR_API_KEY

Body

application/json
model
string
default:doc2x-v3
required

doc2x-v3: PDF → md / tex / docx conversion; the result is a downloadable ZIP archive

Example:

"doc2x-v3"

pdf_url
string
required

Download URL of the PDF file

Example:

"https://example.com/document.pdf"

page_count
integer
required

Number of PDF pages, used for pre-authorization billing and runtime validation

Required range: x >= 1
Example:

10

convert_mode
enum<string>
default:md

Output format

Available options:
md,
tex,
docx
Example:

"md"

formula_mode
enum<string>
default:normal

Formula processing mode

Available options:
normal,
dollar
Example:

"normal"

filename
string | null

Output file name (without extension; truncated at runtime if it exceeds 50 characters)

Maximum string length: 200
Example:

"output"

merge_cross_page_forms
boolean
default:false

Whether to merge cross-page tables

Example:

false

Response

Task created successfully

created
integer

Task creation timestamp

Example:

1757165031

id
string

Task ID

Example:

"task-unified-1757165031-uyujaw3d"

model
string

The actual model name used

object
enum<string>

The specific type of the task

Available options:
document.generation.task
progress
integer

Task progress percentage (0-100)

Required range: 0 <= x <= 100
Example:

0

status
enum<string>

Task status

Available options:
pending,
processing,
completed,
failed
Example:

"pending"

task_info
object

Asynchronous task information

type
enum<string>

The output type of the task

Available options:
document
Example:

"document"