Skip to content

Query: PDF Parse Result

Short description: Query the result of a PDF parsing task and retrieve its parsed output status.


Overview

  • Method: GET
  • Path: /task/{task_id}
  • Content-Type: application/json

Authentication

  • Header: Authorization: Bearer <token>

Request Example

Path Parameters

ParameterTypeRequiredDescription
task_idstringYesTask ID, for example NQ3MCIYONYTJ9UW5JALNR0MFZVICB99G

curl Example

bash
curl -X GET "https://api.gpt.ge/task/NQ3MCIYONYTJ9UW5JALNR0MFZVICB99G" \
  -H "Authorization: Bearer sk-xxxx"

JavaScript (fetch) Example

javascript
fetch('https://api.gpt.ge/task/NQ3MCIYONYTJ9UW5JALNR0MFZVICB99G', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer sk-xxxx'
  }
}).then(r => r.json()).then(console.log);

Python (requests) Example

python
import requests

response = requests.get(
    'https://api.gpt.ge/task/NQ3MCIYONYTJ9UW5JALNR0MFZVICB99G',
    headers={'Authorization': 'Bearer sk-xxxx'}
)
print(response.json())

Response Example (200)

json
{
  "task_id": "NQ3MCIYONYTJ9UW5JALNR0MFZVICB99G",
  "output": {
    "segments": [
      {
        "index": 1,
        "content": "pdf parsing text content...."
      }
    ]
  },
  "status": "success",
  "created_at": 1744560042000,
  "started_at": 1744560042000,
  "completed_at": 1744560047000,
  "urls": {}
}

Note: This endpoint returns parse task status and parsed output data. Check status to determine whether the task has completed successfully.