Skip to main content

Endpoint

GET /presentations/{presentation_id}

Description

Get the current status of a presentation, including slide count and download availability.

Request

curl -X GET "https://poe.poesius.com/api/v1/presentations/{presentation_id}" \
  -H "X-API-Key: pk_your_api_key"

Response

{
  "id": "uuid",
  "title": "Presentation from document.pdf",
  "status": "completed",
  "template_id": "uuid",
  "slide_count": 15,
  "slides": [
    {
      "id": "uuid",
      "position": 1,
      "title": "Slide Title",
      "status": "completed",
      "thumbnail_url": "https://...",
      "download_url": "https://..."
    }
  ],
  "download_url": "https://...",
  "created_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:00:00Z"
}

Status Values

StatusDescription
pendingGeneration has started but not completed
processingContent and slides are being generated
completedPresentation is ready for download
failedGeneration failed (check error details)

Polling for Status

Since generation is asynchronous, you’ll need to poll the status endpoint:

Bash Example

# Poll every 5-10 seconds
while true; do
  STATUS=$(curl -s -X GET \
    "https://poe.poesius.com/api/v1/presentations/{presentation_id}" \
    -H "X-API-Key: pk_your_api_key_here" | jq -r '.status')
  
  echo "Status: $STATUS"
  
  if [ "$STATUS" = "completed" ]; then
    echo "Presentation ready!"
    break
  elif [ "$STATUS" = "failed" ]; then
    echo "Generation failed!"
    exit 1
  fi
  
  sleep 5
done

Python Example

import time
import requests

def poll_presentation_status(presentation_id, api_key, max_wait=300):
    """Poll for presentation status until completed or failed"""
    start_time = time.time()
    
    while time.time() - start_time < max_wait:
        response = requests.get(
            f"https://poe.poesius.com/api/v1/presentations/{presentation_id}",
            headers={"X-API-Key": api_key}
        )
        data = response.json()
        
        status = data.get("status")
        print(f"Status: {status}")
        
        if status == "completed":
            return data
        elif status == "failed":
            raise Exception(f"Generation failed: {data.get('error')}")
        
        time.sleep(5)  # Wait 5 seconds before next poll
    
    raise TimeoutError("Presentation generation timed out")

Best Practices

  • Poll Interval: Wait 5-10 seconds between polls to avoid rate limiting
  • Timeout: Set a maximum wait time (e.g., 5-10 minutes)
  • Error Handling: Always check for failed status and handle errors appropriately

Download Presentation

Download your completed presentations

Error Handling

Learn about error handling and status polling