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

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

const response = await client.mediaCreation.searchBackgrounds({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  body: {},
})
{
  "data": [
    {
      "sourceId": "<string>",
      "url": "<string>",
      "title": "<string>",
      "downloadLocation": "<string>",
      "photographerName": "<string>",
      "photographerUrl": "<string>",
      "searchProvider": "dataforseo",
      "mediaAssetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "sha256": "<string>"
    }
  ],
  "fallback": true,
  "diagnostics": [
    "<string>"
  ],
  "costDecimillicents": 123
}

Authorizations

Authorization
string
header
required

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

Headers

idempotency-key
string
required

a string at most 200 character(s) long

Required string length: 1 - 200

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

a string at most 650 character(s) long

Required string length: 1 - 650
providers
enum<string>[]

an array of at most 2 item(s)

Required array length: 1 - 2 elements
Available options:
unsplash,
pinterest
packId
string

a string at most 128 character(s) long

Maximum string length: 128
runId
string<uuid>

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}$
limit
integer

a number between 1 and 20

Required range: 1 <= x <= 20

Response

SearchBackgroundsResponse

data
object[]
required
fallback
boolean
required
diagnostics
string[]
required
costDecimillicents
number
required