GET
/
v1
/
teams
/
{teamId}
/
ai-media
/
generations
/
{generationId}
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

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

const response = await client.aiMedia.getGeneration({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  generationId: process.env.OCTOSPARK_GENERATION_ID ?? "generationId",
})
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "modelId": "<string>",
  "statusError": "<string>",
  "primaryAssetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "assetIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "estimatedCostDecimillicents": 123,
  "actualCostDecimillicents": 123,
  "callerIdempotencyKey": "<string>",
  "createdAt": "<string>",
  "updatedAt": "<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.

generationId
string
required

Media generation id (UUID), as returned by the create generation and list generations endpoints.

Response

Success

id
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}$
teamId
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}$
organizationId
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}$
sourceSurface
enum<string>
required
Available options:
studio,
agent,
editor
modelId
string
required
modality
enum<string>
required
Available options:
image,
video
route
enum<string>
required
Available options:
openrouter,
fal
status
enum<string>
required
Available options:
queued,
reserved,
running,
rate_limited,
ready,
failed,
cancelled,
skipped_insufficient_credits
statusError
string | null
required
primaryAssetId
string<uuid> | null
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}$
assetIds
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}$
estimatedCostDecimillicents
number
required
actualCostDecimillicents
number
required
callerIdempotencyKey
string | null
required
createdAt
string
required
updatedAt
string
required