POST
/
v1
/
teams
/
{teamId}
/
assets
/
agentic-search
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

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

const response = await client.assets.searchAgenticAssets({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  body: {},
})
{
  "data": [
    {
      "score": 123,
      "rankingReasons": [
        "<string>"
      ],
      "asset": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "originalFilename": "<string>",
        "fileSize": 123,
        "mimeType": "<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>"
        },
        "storagePath": "<string>",
        "thumbnailPath": "<string>",
        "aiTitle": "<string>",
        "aiDescription": "<string>",
        "aiAltText": "<string>",
        "aiTags": [
          "<string>"
        ],
        "contentHash": "<string>",
        "processingError": "<string>",
        "isDeleted": true,
        "deletedAt": "<string>",
        "hardDeletedAt": "<string>",
        "sharedWithOrg": true,
        "folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "folderName": "<string>",
        "displayName": "<string>",
        "aspectRatio": "<string>",
        "isProcessing": true,
        "createdAt": "<string>",
        "updatedAt": "<string>"
      },
      "assetUrl": "<string>",
      "thumbnailUrl": "<string>"
    }
  ],
  "total": 123,
  "nextCursor": "<string>",
  "prevCursor": "<string>",
  "costResult": {
    "name": "<string>",
    "costInCreditsDecimillicents": 123,
    "costInDollars": 123,
    "marginCostInCreditsDecimillicents": 123,
    "marginCostInDollars": 123,
    "attribution": {
      "connectionId": "<string>",
      "organizationId": "<string>",
      "providerCostDecimillicents": 123
    }
  },
  "embeddingStatus": {
    "embeddingsReady": true,
    "totalAssets": 123,
    "withEmbeddings": 123,
    "withoutEmbeddings": 123,
    "message": "<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.

Body

application/json
query
string
required

Natural-language search query; may be empty only for explicitly filtered browse mode.

Maximum string length: 512
Example:

"green screen clip of someone pointing upward"

browse
boolean

Browse by asset types and categories without an embedding request; both filters are required.

cursor
string

a string at most 2048 character(s) long

Maximum string length: 2048
requiredTags
string[]

Exact tags that every browse result must contain, for example image_meme or category:animals. Available only with browse=true.

Required array length: 1 - 20 elements

a string at most 100 character(s) long

Required string length: 1 - 100
mode
enum<string>
default:metadata

Search strategy: metadata (keyword scoring), semantic (vector embeddings), or hybrid (both); defaults to metadata.

Available options:
metadata,
semantic,
hybrid
Example:

"hybrid"

limit
integer
default:10

Maximum number of results to return, 1 to 100; defaults to 10.

Required range: 1 <= x <= 100
Example:

10

includeSeedLibrary
boolean

Whether to also search the shared Octospark seed template library alongside team assets.

assetTypes
enum<string>[]

Restrict results to these asset types (image, video, audio, gif, document).

Available options:
image,
video,
audio,
gif,
document
Example:
["image", "video"]
assetCategories
enum<string>[]

Restrict results to these asset categories, e.g. user_upload, render, green_screen_template, music.

Available options:
user_upload,
render,
template,
green_screen_template,
sound_effect,
music,
brand_asset,
ai_image,
ai_video,
other
Example:
["user_upload"]

Response

Success

data
object[]
required
total
number
required
nextCursor
string | null
required
prevCursor
string | null
required
mode
enum<string>
required
Available options:
metadata,
semantic,
hybrid
costResult
object
required
embeddingStatus
object
required