Making your first API request

Prerequisites

  • JamAI Base account: sign up

  • A project and its project ID: Create a new project

  • Personal Access Token (PAT): Generate in Account Settings (can be global or scoped to a project)

Getting Started

1) Create a Personal Access Token (PAT)

Create a PAT with the scopes your role needs. You may:

  • Scope to a specific project (recommended for least privilege), or

  • Leave unscoped to use the PAT across all projects.

Include the PAT on every request using Bearer auth:

Authorization: Bearer <YOUR_PAT> 

Using our API reference doc/ Swagger UI? Paste your PAT into the Bearer token field.

2) Get project information (quick smoke test)

This call returns project metadata, including LLM token usage and DB storage usage. It also verifies your PAT and project_id.

curl --request GET \
     --url 'https://api.jamaibase.com/api/v2/projects?project_id=<project_id>' \
     --header 'Authorization: Bearer <your PAT>' \
     --header 'accept: application/json'

Expected results

  • 200 OK — Project details returned (includes usage fields).

  • 422 Unprocessable Entity — Validation error (e.g., missing/invalid project_id).

Last updated

Was this helpful?