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

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

const response = await client.assets.searchAssets({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  query: {
    "query": process.env.OCTOSPARK_QUERY ?? "query",
  },
})
{
  "data": [
    {
      "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>",
      "thumbnailUrl": "<string>",
      "fileUrl": "<string>",
      "previewUrlsExpireAt": "<string>"
    }
  ],
  "total": 123,
  "nextCursor": "<string>",
  "prevCursor": "<string>",
  "pageOffset": 123
}

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.

Query Parameters

query
string
required

Keyword search query matched against asset names, tags, and AI-derived metadata.

Minimum string length: 1
Example:

"product launch banner"

semantic
string

Reserved for a future semantic mode: any truthy value currently returns 400 (semantic search via this endpoint is not yet available). Omit it, and use searchAgenticAssets for natural-language search.

Example:

"false"

cursor
string

Opaque pagination cursor from the previous page response (nextCursor/prevCursor); omit to start at the first page.

offset
string

Zero-based row offset to jump to (numbered pages), 0 to 10000. With a cursor, the jump starts from that cursor; without one it is a plain offset. Lists not yet on the signed cursor standard ignore it.

Examples:

"0"

"25"

limit
string
default:25

Page size as a positive integer string; defaults to 25, capped at 100.

Examples:

"25"

"100"

sortBy
string

Field to sort by; each endpoint accepts its own allowlist and defaults to createdAt.

Example:

"createdAt"

sortOrder
enum<string>
default:desc

Sort direction: asc or desc; defaults to desc.

Available options:
asc,
desc
filter[assetType]
enum<string>

Restrict results to one media type (e.g. image or video).

Available options:
image,
video,
audio,
gif,
document
filter[folderId]
string

Restrict results to one folder by uuid, or the literal "root" for assets outside any folder.

Pattern: ^(root|[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})$
Example:

"root"

Response

Success

data
object[]
required
total
number
required
nextCursor
string | null
required

Opaque cursor for the page after this one; null on the last page.

prevCursor
string | null
required

Opaque cursor for the page before this one; null on the first page. Lists on the signed cursor standard return a real backwards cursor; older lists echo the request cursor.

pageOffset
number | null

Zero-based position of the first row of this page within total (for "Showing 26-50 of 268" and page numbers); null when unknown.