Skip to main content

commaPDF Service

A powerful PDF processing service that converts PDF documents into clean, well-formatted Markdown. Offered through Cobbling AI, commaPDF enables seamless conversion of complex PDF content while preserving structure and formatting.

Features

  • High-fidelity PDF to Markdown conversion
  • Intelligent preservation of:
    • Document structure
    • Formatting elements
    • Lists and headings
    • Tables and graphics
  • Complete content extraction from multi-page documents
  • Support for various PDF types (text-based, scanned, mixed)

Usage Limits

The commaPDF service is available to all registered users:

  • Free users: 100 pages per month
  • Subscribed users: 5,000 pages per month
  • Overage charges: $0.002 per page beyond monthly limit

To maximize your usage:

  1. Sign up for a Cobbling AI account
  2. Create a project and generate your API key
  3. Upgrade to a subscription for higher monthly limits

Generating Your API Key

To access the service:

  1. Log in to your Cobbling AI account
  2. First create a project from your dashboard
  3. Navigate to your project and click "Create new secret key"
  4. Copy and securely store your API key
  5. Use this key in your API requests

API Usage

Upload PDF for Parsing

POST https://api.commapdf.cobbling.ai/v1/parsing/upload
Authorization: Bearer <your_api_key>
Content-Type: multipart/form-data

file: <pdf_file>

Response

{
"id": 12345,
"status": "pending",
"succeededPages": 0,
"totalPages": 10
}

Possible status values:

  • pending: Job is queued
  • started: Job has begun processing
  • running: Job is currently processing
  • error: Job encountered an error
  • completed: Job is finished

Check Job Status

GET https://api.commapdf.cobbling.ai/v1/parsing/jobs/:jobId
Authorization: Bearer <your_api_key>

Response

{
"id": 12345,
"status": "completed",
"succeededPages": 10,
"totalPages": 10
}

Retrieve Markdown Result

Once the job status is completed, retrieve the markdown output:

GET https://api.commapdf.cobbling.ai/v1/parsing/jobs/:jobId/result/markdown
Authorization: Bearer <your_api_key>

Response

{
"markdown": "# Converted Document\n\nThis is the converted content..."
}

Register a Webhook

To receive automatic notifications about job status changes:

POST https://api.commapdf.cobbling.ai/v1/webhooks
Authorization: Bearer <your_api_key>
Content-Type: application/json

{
"url": "https://your-server.com/webhook"
}

Response

{
"url": "https://your-server.com/webhook"
}

Webhook Notifications

Registered webhooks will receive events with the following format:

{
"type": "job.completed", // or "job.created", "job.started", "job.failed"
"id": "event-id",
"payload": {
"job": {
"id": 12345,
"status": "completed",
"succeededPages": 10,
"totalPages": 10
}
},
"createdAt": 1677721600000
}

Error Handling

Common error responses:

  • 400 Bad Request: Invalid parameters or file format
  • 401 Unauthorized: Invalid API key
  • 402 Payment Required: Usage limit exceeded
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Job ID not found
  • 429 Too Many Requests: Rate limit exceeded

Security

  • API key authentication required for all requests
  • Secure data handling and processing
  • API key revocation available in your account settings
  • Usage tracking available in your dashboard