SDK
Optional SDKs for calling the gospace API from code.
SDKs are optional. If you prefer not to manage raw HTTP calls, use an SDK to authenticate and call versioned services consistently.
Available packages
- Node.js:
@gospace/sdk-node - Python:
gospace-sdk
SDKs are in preview. If you need access, contact support@gospace.ai.
Installation
# Node.js / TypeScript
npm install @gospace/sdk-node
# Python
pip install gospace-sdk
Configure a client (Node.js example)
import { gospaceClient } from '@gospace/sdk-node'
const client = new gospaceClient({
apiKey: process.env.GOSPACE_API_KEY, // or use accessToken for bearer auth
baseUrl: 'https://api.gospace.ai' // set to https://api.uat.gospace.ai for UAT
})
const system = client.service('system', { version: 'v1' })
const workspaces = await system.get('/workspaces', { query: { limit: 25 } })
Python clients expose the same shape: gospaceClient(...).service("<service>", version="v1").get(...).
Tips
- Use
x-api-keyorAuthorization: Bearer ...under the hood; both are supported by the shared authorizer. - Override
baseUrlper environment; the SDK does not hardcode production. - Keep versions explicit so you can pin to
/v1even as new versions ship.