GET
/
v1
/
teams
/
{teamId}
/
content
/
media-templates
/
{assetId}
/
preview
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.mediaCreation.getMediaTemplatePreview({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  assetId: process.env.OCTOSPARK_ASSET_ID ?? "assetId",
})
{
  "assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "url": "<string>",
  "sha256": "<string>",
  "assetTypeData": {
    "type": "image",
    "width": 123,
    "height": 123,
    "format": "<string>",
    "colorSpace": "<string>",
    "meme": {
      "sourceTemplateId": "<string>",
      "sourceUrl": "<string>",
      "captionBoxCount": 1,
      "templatePageUrl": "<string>",
      "captionZones": [
        {
          "key": "<string>",
          "label": "<string>",
          "x": 0.5,
          "y": 0.5,
          "width": 0,
          "height": 0,
          "style": {
            "fontFamily": "<string>",
            "fontSize": 259,
            "fill": "<string>",
            "stroke": "<string>",
            "strokeWidth": 10,
            "bold": true,
            "uppercase": true,
            "italic": true,
            "shadow": true,
            "opacity": 0.5
          },
          "rotation": 0
        }
      ],
      "layout": {
        "sourcePageUrl": "<string>",
        "capturedAt": "<string>",
        "canvasWidth": 4096.5,
        "canvasHeight": 4096.5,
        "imageBounds": {
          "x": 0.5,
          "y": 0.5,
          "width": 0,
          "height": 0
        },
        "sourceApiUrl": "<string>",
        "generatorScriptUrl": "<string>",
        "modelId": "<string>",
        "generationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      }
    },
    "aspectRatio": "<string>"
  },
  "thumbnailUrl": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

teamId
string
required

Team (workspace) id (UUID). Discover ids via the list teams endpoint or the agent context.

assetId
string
required

Media-library asset id (UUID), as returned by asset list, search, and upload endpoints.

Response

MediaTemplatePreviewResponse

assetId
string<uuid>
required

a Universally Unique Identifier

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
url
string
required
sha256
string | null
required
assetTypeData
object
required
thumbnailUrl
string