Skip to main content
By default the HTTP client targets the staging API:
https://mind-be.staging.miva.university/v1

Override the base URL

Resolution happens in priority order:
  1. config.baseUrl — explicit, wins over everything.
  2. Environment variables, with a /v1 suffix appended automatically if missing:
    • API_BASE_URL
    • VITE_API_BASE_URL
    • NEXT_PUBLIC_API_BASE_URL
The playground’s .env points at a local backend:
API_BASE_URL=http://localhost:8000
VITE_API_BASE_URL=http://localhost:8000

Request headers

Every request is sent with:
  • Authorization: Bearer <token><token> is the current value of the cookie named by MindConfig.authCookieKey; the header is omitted when the cookie is absent
  • X-Mind-SDK-Version: 1.0.0
  • Accept: application/json (and Content-Type: application/json for JSON bodies)
The client retries failed requests up to 3 times with a 30s timeout and sends credentials (credentials: 'include').