GET

Get the workspace

The workspace your key belongs to, its environment, and what its plan allows.

View as Markdown
GEThttps://api.muzekit.com/v1/workspace
curl https://api.muzekit.com/v1/workspace \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY"

plan is the editor's plan, the same for Test and Live keys. live is false when sessions are refused; reason says why (no_plan, payment_failed, subscription_paused). The numbers in limits are your plan's (the example below is only an example; see Pricing). A null limit is unlimited. period is the current billing period and what it has used: sessions on https (Test and Live share one pool), free localhost sessions and API credits. Yearly plans get twelve months of pools up front.

Examples

Check the editor can open before you show it

Run this in a health check or when your admin page loads. When plan.live is false, Create a session answers 402 plan_required, so hide your "Open editor" button and tell your team why.

curl -s https://api.muzekit.com/v1/workspace \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
  | jq '{ live: .plan.live, reason: .plan.reason, status: .plan.status }'

Warn before this period's sessions run out

Compare period.sessions_used with limits.sessions. Past the pool, a small margin still opens; after it, new sessions answer 402 sessions_exhausted until you add sessions in Billing or the next period starts. Editors already open keep working.

curl -s https://api.muzekit.com/v1/workspace \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
  | jq -r '.plan | if .limits.sessions == null then "unlimited"
      else "\(.period.sessions_used) of \(.limits.sessions) sessions" end'

Check API credits before a large batch

Live renders use API credits: 1 for each image or PDF page, and 1 a second of video. Test renders are free. Read what is left before you queue a batch with a Live key; when credits run out, the rest of the batch fails with api_credits_exhausted.

curl -s https://api.muzekit.com/v1/workspace \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY" \
  | jq '.plan.limits.api_credits - .plan.period.api_credits_used'

Confirm a key's environment at deploy

A Test key in production shows your users Test data, and a Live key never opens the editor on localhost. Check environment (test or live) when your server starts.

curl -s https://api.muzekit.com/v1/workspace \
  -H "Authorization: Bearer $MUZEKIT_SECRET_KEY" | jq -r .environment

Response

JSON
{
  "object": "workspace",
  "id": "ws_…",
  "name": "Acme editor",
  "environment": "test",
  "region": "us",
  "plan": {
    "id": "…",
    "name": "…",
    "status": "active",
    "live": true,
    "reason": null,
    "interval": "monthly",
    "limits": {
      "members": 5,
      "sessions": 40000,
      "localhost_sessions": 10000,
      "api_credits": 25000,
      "ai_credits": 1000,
      "storage_gb": 100,
      "library_picks": 500,
      "origins": 2,
      "render_days": 90,
      "video_length": 300,
      "audio_tracks": 2
    },
    "period": {
      "start": "2026-11-23T10:00:00.000Z",
      "end": "2026-12-23T10:00:00.000Z",
      "sessions_used": 1280,
      "localhost_sessions_used": 410,
      "api_credits_used": 3150
    }
  }
}
LimitWhat it caps
membersTeam seats in the dashboard
sessionsEditor sessions on https a period (Test and Live together)
localhost_sessionsFree localhost sessions a period (fair use)
api_creditsAPI credits a period (renders)
ai_creditsAI credits a period
storage_gbStorage for uploads and brand files
library_picksReady-made templates you can add from the catalog
originsLive domains the editor can be embedded on
render_daysDays a Live render's files are kept (expires_at)
video_lengthLongest video render, in seconds
audio_tracksAudio tracks a page of a video