POST
/
v1
/
teams
/
{teamId}
/
ai-media
/
estimates
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

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

const response = await client.aiMedia.estimateGeneration({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  body: {},
})
{
  "holdDecimillicents": 123,
  "unit": "<string>",
  "unitPriceUsd": 123,
  "pricingVerifiedAt": "<string>",
  "stale": true
}

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
sourceSurface
enum<string>
required

Where the generation would be started from (studio, agent, or editor). Used for attribution only.

Available options:
studio,
agent,
editor
modality
enum<string>
required

What would be generated: image or video. Must match the chosen model and the shape of params.

Available options:
image,
video
modelId
string
required

Catalog model id to price the generation against, e.g. "google/veo-3.1-fast".

params
object
required

The exact generation parameters you would submit, so the estimate matches what a real create would reserve.

Response

Success

holdDecimillicents
integer
required

an integer

unit
string
required
unitPriceUsd
number
required
pricingVerifiedAt
string
required
stale
boolean
required