The SDKs are generated from the same openapi.json that powers this reference. They use Authorization: Bearer $OCTOSPARK_TOKEN and default to https://api.octospark.ai.

TypeScript

npm install @octospark/sdk
import { OctosparkApiError, OctosparkClient } from "@octospark/sdk"

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

try {
  const organizations = await octospark.organizations.listOrganizations({
    query: { limit: 1 }
  }) as { data: Array<{ id: string; name?: string }> }

  console.log(organizations.data[0])
} catch (error) {
  if (error instanceof OctosparkApiError) {
    console.error(error.status, error.body)
  } else {
    throw error
  }
}
The SDK defaults to https://api.octospark.ai. Pass baseUrl to the client constructor to target a different Octospark API environment. See Authentication, Get started, the organizations API reference, or the OpenAPI document.

Python

The Python SDK is published to PyPI as octospark-sdk and is currently in preview. The generated client uses the same bearer-token authentication model as the TypeScript SDK and defaults to https://api.octospark.ai.
pip install octospark-sdk
import os
from octospark_sdk import OctosparkClient

octospark = OctosparkClient(token=os.environ["OCTOSPARK_TOKEN"])

organizations = octospark.organizations.list_organizations(
    query={"limit": 1}
)

print(organizations["data"][0])
The SDK defaults to https://api.octospark.ai. Pass base_url to the client constructor to target a different Octospark API environment.