01 / GETTING STARTED
Start with the public API
Public catalog reads do not require an API key. The production command uses the latest published build. To test changes in this workspace before publishing, run the preview command from Replit Shell.
curl https://tuluai.app/api/gena/datasetscurl "https://${REPLIT_DEV_DOMAIN}:5000/api/gena/datasets"{
"datasets": [
{
"id": "tulueng100-reference",
"title": "TuluEng100",
"language": "Tulu",
"license": "..."
}
]
}npm install, configure the required environment variables below, then run npm run dev.02 / GENA DATA API
Datasets, available to build with
Gena makes public datasets discoverable through a small JSON API. Public reads need no credentials. Contributors can publish datasets directly after confirming their rights and public-release intent.
| Method | Path | Access | Purpose |
|---|---|---|---|
| GET | /api/gena/datasets | Public | List public datasets. Returns { datasets }. |
| GET | /api/gena/datasets/{id} | Public | Fetch metadata and file content for one public dataset. |
| POST | /api/gena/datasets | Signed-in account | Publish a dataset to the public catalog. |
Publish a dataset
Send the current signed-in account token in the authorization header. The request must include a license, confirmation that you have the right to share the data, and confirmation that you want it published publicly.
curl -X POST https://tuluai.app/api/gena/datasets \
-H 'Authorization: Bearer <signed-in-account-token>' \
-H 'Content-Type: application/json' \
-d '{
"title": "Example collection",
"description": "Short description of the data and its collection.",
"language": "English",
"license": "CC BY 4.0",
"fileName": "examples.jsonl",
"content": "{\"text\":\"Sample row\"}\n",
"rightsConfirmed": true,
"publicReleaseConfirmed": true
}'.csv, .json, .jsonl, and .txt. File content is limited to 900,000 bytes. A successful publish returns 201 with status published.03 / OFFICIAL CLIENTS
Use Gena from your project
Both clients default to https://tuluai.app. Listing and downloading public datasets do not need an API key. Submitting data requires a current signed-in user token.
@tuluai/gena-datasets
npm install @tuluai/gena-datasets
import { GenaDatasetsClient } from '@tuluai/gena-datasets'
const gena = new GenaDatasetsClient()
const datasets = await gena.listDatasets({ language: 'Tulu' })
const dataset = await gena.getDataset(datasets[0].id)gena-datasets
python -m pip install gena-datasets
from gena_datasets import GenaDatasetsClient
gena = GenaDatasetsClient()
datasets = gena.list_datasets(language="Tulu")
dataset = gena.get_dataset(datasets[0]["id"])See the Gena library guide for complete install steps, read and download examples, dataset submission, and error handling.
04 / DEVELOPER API KEYS
Authenticate from your server
Create and revoke keys in the developer dashboard. A key is shown only once. Store it in your server-side secret manager and send it as a bearer token. Do not include it in browser or mobile code.
The versioned /api/v1 endpoints below require a key with the matching scope. For automated key management, GET and POST /api/developers/keysplus DELETE /api/developers/keys/{id} use your signed-in TuluAI account token.
| Scope | Supported endpoints | Access |
|---|---|---|
gena:read | GET /api/v1/gena/datasets, GET /api/v1/gena/datasets/{id} | Approved public datasets only. |
models:chat | POST /api/v1/chat, POST /api/v1/kenle/chat | Chat and published assistants. |
models:learn | POST /api/v1/kalple | Guided learning. |
models:translate | POST /api/v1/translate | Pattern engine and optional model translation. |
models:eru | POST /api/v1/eru | Eru assistant. |
curl -X POST https://tuluai.app/api/v1/chat \
-H 'Authorization: Bearer <your-api-key>' \
-H 'Content-Type: application/json' \
-d '{"message":"Hello"}'05 / INTEGRATIONS
Runtime and publishing credentials
Runtime credentials are managed by TuluAI. Developers should use scoped TuluAI API keys rather than provider credentials. Never put server keys in source control, client code, or public documentation.
| Service | Configuration name | Where it is used | Handling |
|---|---|---|---|
| Model services | TuluAI-managed server configuration | Chat, Kalple, translation, Eru, Kenle, and Gena assistant routes. | Managed by TuluAI. Developers do not need provider keys to use the public API. |
| Firebase web app | NEXT_PUBLIC_FIREBASE_API_KEY, NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN, NEXT_PUBLIC_FIREBASE_DATABASE_URL, NEXT_PUBLIC_FIREBASE_PROJECT_ID, NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET, NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID, NEXT_PUBLIC_FIREBASE_APP_ID, optional NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID | Firebase Authentication, Realtime Database, and Storage. | Web configuration is delivered to the browser and is not an authorization secret. Secure data with Firebase Auth and database/storage rules. |
| Firebase emulator | NEXT_PUBLIC_FIREBASE_EMULATOR_HOST | Local authenticated UI tests only. | Optional local setting. Do not point production users at an emulator. |
| Replicate | Replit-managed Replicate connection | Moderator-only Gena training and prediction route. | Uses @replit/connectors-sdk. The provider credential is managed by the connected integration, not a raw environment key in app code. |
| Kenle rate limits | SESSION_SECRET | Server-side hashing for shared chatbot request limits. | Private server secret. Not an external API key. |
| npm publishing | NPM_TOKEN | Maintainer release of the JavaScript SDK. | Release-only secret. Never needed by the running site or package consumers. |
| PyPI publishing | PYPI_API_TOKEN | Maintainer release of the Python SDK. | Release-only secret. Never needed by the running site or package consumers. |
| Firebase CLI | FIREBASE_TOKEN | Not read by the application runtime. | Legacy CLI token. Do not use for new deploys; use a supported Google credential flow. |
06 / PRODUCT API ROUTES
Server-side model routes
Model credentials stay on TuluAI servers. Product clients call TuluAI routes rather than sending service credentials from the browser.
POST /api/chatChat assistant. Model execution and credentials remain server-side.POST /api/kalpleGuided Tulu learning and pop-quiz responses.POST /api/translatePattern engine by default; optional free-model translation.POST /api/eruEru assistant. Model execution and credentials remain server-side.POST /api/kenle/chatPublished Kenle assistants grounded in their configured sources.POST /api/gena/assistantPrivate, selected-workspace assistant. Requires sign-in and consent for external processing.POST /api/gena/processProcesses selected Gena content after explicit consent.POST /api/gena/replicateModerator-only model operations through the managed Replicate connection.Product routes validate their own request shape and rate limits. Treat them as application endpoints, not as a promise of a stable third-party API contract.
07 / GENA NOTEBOOKS
Bring your own compute
Gena stores and organizes data. Notebook code runs in the browser, on the user’s local Gena Runner, or on a Jupyter service the user connects. The application server is not a notebook execution host.
- Install the desktop Runner from Gena Notebooks for local Python execution.
- Jupyter connections use the user’s own server URL and access token. Keep that token private and do not commit it.
- Notebook code runs with the connected computer’s file and network permissions. Review code before running it.
08 / SECURITY
Keep credentials and data safe
- Keep model-service, session, registry, and deployment secrets server-side in Replit Secrets or an ignored local environment file.
- Variables prefixed with
NEXT_PUBLIC_are intended for browser configuration. Never use that prefix for a private provider secret. - Firebase web API configuration is public by design. Authentication and Firebase rules enforce access; the API key alone is not authorization.
- Use the Gena dataset clients for public data. Publishing requires a signed-in account, rights confirmation, and public-release confirmation.
- Gena processing and model training require explicit consent for the selected content. Check current provider pricing before any paid operation.