In a few minutes: a sandbox key, your contents listed, a content created with its text, a memocard added, then an AI generation started — simulated, without using any credit. Every example comes in curl, JavaScript and Python; the language you pick applies to the whole page.
1. Get a sandbox key
API access is opened on request, one organization at a time. Write to contact@memojin.com with your organization, the Memojin account the integration will act for, and what you want to build. Our team creates your organization and gives you a mj_test_… key.
It is shown only once: store it right away in an environment variable on your server.
export MEMOJIN_API_KEY="mj_test_…"2. List your contents
First call: the contents stored at the root of the account’s library, most recent first. The folderId parameter lists a folder.
/v1/contentsScope contents:readcurl "https://api.memojin.com/v1/contents?limit=20" \
-H "Authorization: Bearer $MEMOJIN_API_KEY"{
"data": [
{
"id": "3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87",
"title": "Photosynthesis",
"description": "Light and dark reactions, chlorophyll, the Calvin cycle.",
"language": "en",
"folderId": "7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60",
"imageUrl": null,
"createdAt": "2026-10-01T14:03:00.000Z",
"updatedAt": "2026-10-02T08:30:12.000Z",
"inclusions": {
"hasBody": true,
"hasSummary": false,
"memocardsCount": 12,
"questionsCount": 3,
"podcastsReadyCount": 0,
"sourcesCount": 1
}
}
],
"nextCursor": null,
"hasMore": false
}A list always answers { data, nextCursor, hasMore }: see pagination.
3. Create a content with its text
The text is stored as is: no AI model runs and no credit is used. The Idempotency-Key header lets you retry without creating the same content twice (see idempotency).
/v1/contentsScope contents:writecurl -X POST "https://api.memojin.com/v1/contents" \
-H "Authorization: Bearer $MEMOJIN_API_KEY" \
-H "Idempotency-Key: 6f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87" \
-H "Content-Type: application/json" \
-d '{
"title": "Photosynthesis",
"language": "en",
"text": "Photosynthesis converts light energy into chemical energy. In the chloroplasts, chlorophyll absorbs light; the light-dependent reactions produce ATP and NADPH, which the Calvin cycle uses to fix carbon dioxide into sugars."
}'{
"id": "3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87",
"title": "Photosynthesis",
"description": "Light and dark reactions, chlorophyll, the Calvin cycle.",
"language": "en",
"folderId": "7a2d9c41-0b3e-4c5f-8e6a-1d2c3b4a5f60",
"imageUrl": null,
"createdAt": "2026-10-01T14:03:00.000Z",
"updatedAt": "2026-10-02T08:30:12.000Z",
"inclusions": {
"hasBody": true,
"hasSummary": false,
"memocardsCount": 12,
"questionsCount": 3,
"podcastsReadyCount": 0,
"sourcesCount": 1
}
}The 201 response carries a Location header (/v1/contents/{contentId}). Keep the id for the next steps.
4. Add a memocard
Front and back, as text (LaTeX formulas are kept). The memocard is added at the end of the content.
/v1/contents/{contentId}/memocardsScope memocards:writecurl -X POST "https://api.memojin.com/v1/contents/3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87/memocards" \
-H "Authorization: Bearer $MEMOJIN_API_KEY" \
-H "Idempotency-Key: 6f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87" \
-H "Content-Type: application/json" \
-d '{
"front": "Where does photosynthesis take place?",
"back": "In the chloroplasts, mainly in the leaves."
}'{
"id": "c5e8a1b2-3d4f-4a6b-9c8d-7e6f5a4b3c21",
"contentId": "3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87",
"front": "Where does photosynthesis take place?",
"back": "In the chloroplasts, mainly in the leaves.",
"explanation": null,
"retention": 0.82,
"lastReviewedAt": "2026-10-03T18:12:00.000Z",
"createdAt": "2026-10-01T14:05:00.000Z",
"updatedAt": "2026-10-01T14:05:00.000Z"
}5. Start an AI generation
Generating memocards from the text of a content takes from a few seconds to a few minutes: the API answers at once 202 Accepted with a job to follow. With a mj_test_ key, nothing is generated and no credit is used: the job is succeeded at once.
/v1/contents/{contentId}/memocard-generationsScope generations:writecurl -X POST "https://api.memojin.com/v1/contents/3f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87/memocard-generations" \
-H "Authorization: Bearer $MEMOJIN_API_KEY" \
-H "Idempotency-Key: 6f1c2b0e-8d4a-4f7e-9a51-3c2d1e0f9b87"{
"jobId": "5a4db0c5-0001-8a3f-8c21-4b7d9e0f1a2c",
"status": "succeeded",
"estimate": {
"operation": "ai_card",
"units": 0
}
}Follow the job until it is finished:
/v1/jobs/{jobId}Scope jobs:readcurl "https://api.memojin.com/v1/jobs/5a4db0c5-0001-8a3f-8c21-4b7d9e0f1a2c" \
-H "Authorization: Bearer $MEMOJIN_API_KEY"{
"id": "5a4db0c5-0001-8a3f-8c21-4b7d9e0f1a2c",
"type": "memocard_generation",
"status": "succeeded",
"progress": 100,
"contentId": null,
"error": null,
"createdAt": "2026-10-05T09:00:00.000Z",
"updatedAt": "2026-10-05T09:00:00.000Z"
}In production, the job goes through pending and running: poll it about every 5 seconds, then list the memocards of the content. Everything is detailed in AI generations and jobs.
6. Go live
When your integration is ready, ask for production at the same address. Once our team approves it, you receive a mj_live_… key: the same code, with no other change, now acts for real, and generations use the AI credits of the account.