Skip to main content
GET
/
api
/
content
/
:id
Get Content
curl --request GET \
  --url https://api.example.com/api/content/:id
{
  "error": "Content ID is required"
}

Endpoint

GET /api/content/:id

Authentication

No authentication required.

Path Parameters

id
string
required
The unique identifier of the content

Response

success
boolean
Indicates if the request was successful
data
object

Example Request

curl https://api.distylia.com/api/content/content-123

Example Response

{
  "success": true,
  "data": {
    "id": "content-123",
    "type": "text",
    "format": "image",
    "caption": "Transform your productivity with these essential tips! ๐Ÿš€",
    "hashtags": "#productivity #success #worklife #motivation",
    "audioUrl": null,
    "createdAt": "2024-01-08T10:30:00.000Z",
    "metadata": {
      "platform": "instagram",
      "visualTemplate": "infographic",
      "slideCount": null,
      "customPrompt": null
    },
    "images": [
      {
        "id": "img-1",
        "url": "https://storage.example.com/content/image-123.png",
        "slideNumber": 1,
        "createdAt": "2024-01-08T10:30:00.000Z"
      }
    ],
    "videos": []
  }
}

Error Responses

{
  "error": "Content ID is required"
}

Use Cases

  • Retrieve previously generated content
  • Access content using a known content ID
  • View content details and metadata
  • Get direct URLs to media files

Notes

  • This endpoint returns the same structure as the job result endpoint
  • Content IDs are permanent and donโ€™t expire
  • Use this endpoint when you have the content ID but not the job ID