> ## Documentation Index
> Fetch the complete documentation index at: https://docs.distylia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Content

> Retrieve content by its unique identifier

## Endpoint

```
GET /api/content/:id
```

## Authentication

No authentication required.

## Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the content
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      Content identifier
    </ResponseField>

    <ResponseField name="type" type="string">
      Content type: `text` or `pdf`
    </ResponseField>

    <ResponseField name="format" type="string">
      Content format: `image`, `carousel`, or `reel`
    </ResponseField>

    <ResponseField name="caption" type="string">
      Generated caption text
    </ResponseField>

    <ResponseField name="hashtags" type="string">
      Suggested hashtags
    </ResponseField>

    <ResponseField name="audioUrl" type="string">
      URL to audio file (for reels)
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO timestamp
    </ResponseField>

    <ResponseField name="metadata" type="object">
      Additional metadata including generation parameters
    </ResponseField>

    <ResponseField name="images" type="array">
      Array of image objects with URLs
    </ResponseField>

    <ResponseField name="videos" type="array">
      Array of video objects with URLs
    </ResponseField>
  </Expandable>
</ResponseField>

## Example Request

```bash theme={null}
curl https://api.distylia.com/api/content/content-123
```

## Example Response

```json theme={null}
{
  "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

<ResponseExample>
  ```json 400 - Content ID Required theme={null}
  {
    "error": "Content ID is required"
  }
  ```

  ```json 404 - Content Not Found theme={null}
  {
    "success": false,
    "error": "Content with ID xyz not found"
  }
  ```
</ResponseExample>

## 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
