Study tools How to Use Pricing FAQs
About Contact Learning Center
REST API v1

ShortMe.lk API

Programmatic access to all ShortMe.lk features — notes, papers, quizzes, books, translations, AI tools, and more.

120+
Endpoints
17
Controller Groups
JSON
Response Format
Sanctum
Authentication
🔐 Authentication

Bearer Token Authentication

All authenticated endpoints require a Sanctum Personal Access Token in the Authorization header.

Authorization: Bearer YOUR_API_TOKEN

Getting a token:

POST /api/auth/register
{
    "name": "John Doe",
    "email": "john@example.com",
    "password": "secret123",
    "password_confirmation": "secret123"
}

// Response:
{
    "success": true,
    "data": {
        "user": { "id": 1, "name": "John Doe", "email": "john@example.com" },
        "token": "1|abc123..."
    }
}

Content-Type: All requests must send Content-Type: application/json (or multipart/form-data for file uploads).

📦 Response Format

All endpoints return JSON with a consistent structure:

// Success
{
    "success": true,
    "data": { ... },
    "message": "Optional success message"
}

// Error
{
    "success": false,
    "error": "Error description",
    "message": "Detailed error (validation)"
}

HTTP Status Codes:

200Success
201Created (register, generate)
422Validation error
401Unauthenticated
403Forbidden
404Not found
429Rate limited / plan limit reached
500Server error
👤 Authentication
POST /api/auth/register Create a new account Public ▶
ParameterTypeRequiredDescription
namestringrequiredFull name
emailstringrequiredValid email address
passwordstringrequiredMin 8 chars, mixed case + numbers
password_confirmationstringrequiredMust match password
Response (201)
{
    "success": true,
    "data": {
        "user": { "id": 1, "name": "John", "email": "john@example.com", "email_verified_at": null },
        "token": "1|abc123..."
    },
    "message": "Registration successful. Please verify your email."
}
POST /api/auth/login Sign in and get token Public ▶
ParameterTypeRequiredDescription
emailstringrequiredRegistered email
passwordstringrequiredAccount password
Response (200)
{
    "success": true,
    "data": {
        "user": { "id": 1, "name": "John", "email": "john@example.com" },
        "token": "2|xyz789..."
    }
}
POST /api/auth/logout Revoke current token Auth ▶

No parameters needed. Revokes the token used in the Authorization header.

GET /api/auth/me Get current user profile Auth ▶
Response (200)
{
    "success": true,
    "data": {
        "user": {
            "id": 1, "name": "John", "email": "john@example.com",
            "is_admin": false, "email_verified_at": "2026-09-01T...",
            "subscription": { "plan": "pro", "status": "active", "expires_at": "2026-10-01T..." }
        }
    }
}
POST /api/auth/forgot-password Send password reset link Public ▶
ParameterTypeRequiredDescription
emailstringrequiredRegistered email address
POST /api/auth/reset-password Reset password with token Public ▶
ParameterTypeRequiredDescription
tokenstringrequiredReset token from email
emailstringrequiredEmail address
passwordstringrequiredNew password
password_confirmationstringrequiredMust match password
💳 Subscription & Plans
GET /api/subscription Current subscription details Auth ▶
Response (200)
{
    "success": true,
    "data": {
        "subscription": { "id": 1, "plan": "pro", "status": "active", "expires_at": "..." },
        "usage": { "daily_used": 3, "daily_limit": null, "plan_name": "Pro" }
    }
}
GET /api/plans List available plans Auth ▶
Response (200)
{
    "success": true,
    "data": {
        "plans": [
            { "name": "free", "price": 0, "features": [...] },
            { "name": "pro", "price": 990, "features": [...] },
            { "name": "ultra", "price": 2990, "features": [...] }
        ]
    }
}
POST /api/subscription/upgrade Upgrade to a paid plan Auth ▶
ParameterTypeRequiredDescription
plan_namestringrequiredpro or ultra
POST /api/subscription/cancel Cancel current subscription Auth ▶

No parameters. Cancels the active subscription.

📄 Documents & Short Notes
GET /api/documents List user's documents Auth ▶
ParameterTypeRequiredDescription
typestringoptionalFilter: notes or paper
pageintegeroptionalPage number (default: 1)
POST /api/documents/short-notes/file Generate notes from PDF/file Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
source_pdffilerequiredPDF, DOC, DOCX, PPT, PPTX (max 50MB)
titlestringoptionalDocument title (max 255)
languagestringoptionalOutput language (default: sinhala)
note_stylestringoptionalbullets, paragraph, flashcards, flashcard_deck, high_level
note_lengthstringoptionalbrief or detailed (default: detailed)
tonestringoptionalformal, casual, academic, technical, friendly
focus_areastringoptionalSpecific topics to focus on (max 1000)
custom_instructionsstringoptionalAdditional instructions (max 1000)
Response (201)
{
    "success": true,
    "data": {
        "paper": { "id": 42, "status": "generating", "type": "notes", "title": "My Notes" },
        "message": "Generation started. Poll /api/documents/{id} for status."
    }
}
POST /api/documents/short-notes/text Generate notes from pasted text Auth ▶
ParameterTypeRequiredDescription
source_textstringrequiredRaw text content (max 50,000 chars)
titlestringoptionalDocument title
languagestringoptionalOutput language
note_stylestringoptionalbullets, paragraph, flashcards, flashcard_deck, high_level
note_lengthstringoptionalbrief or detailed
tonestringoptionalformal, casual, academic, technical, friendly
focus_areastringoptionalFocus topics
custom_instructionsstringoptionalExtra instructions
POST /api/documents/short-notes/audio Generate notes from audio/video Auth ▶
ParameterTypeRequiredDescription
source_audiofile*Audio/video file (MP3, WAV, MP4, etc.)
source_urlstring*YouTube or audio URL (Pro feature)
source_langstringoptionalAudio language (default: auto-detect)
titlestringoptionalDocument title
languagestringoptionalOutput language
note_stylestringoptionalNote style
note_lengthstringoptionalbrief or detailed
tonestringoptionalTone

* Provide either source_audio (file) or source_url (URL), not both.

POST /api/documents/short-notes/url Generate notes from a URL Auth ▶
ParameterTypeRequiredDescription
source_urlstringrequiredURL to extract content from
titlestringoptionalDocument title
languagestringoptionalOutput language
note_stylestringoptionalNote style
note_lengthstringoptionalbrief or detailed
tonestringoptionalTone
GET /api/documents/{paper} Get document details + content Auth ▶
Response (200)
{
    "success": true,
    "data": {
        "paper": {
            "id": 42, "title": "My Notes", "type": "notes", "status": "completed",
            "language": "sinhala", "created_at": "...",
            "generated_content": { "markdown": "...", "chunks": [...], "diagrams": [...] }
        }
    }
}
GET /api/documents/{paper}/download/{format} Download document Auth ▶
ParameterTypeRequiredDescription
formatstringrequiredpdf, word, txt, or bilingual-pdf
DELETE /api/documents/{paper} Delete a document Auth ▶

Permanently deletes the document and its files.

POST /api/documents/{paper}/retry Retry failed generation Auth ▶

Retries generation for a document with status failed.

📋 Question Papers
POST /api/question-papers/file Generate from PDF/file Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
source_pdffilerequiredSource file (PDF, DOC, DOCX, PPT, PPTX)
titlestringrequiredPaper title (max 255)
question_typestringrequiredmcq, essay, short, mixed
question_countintegerrequiredNumber of questions (1-50)
options_countintegeroptionalMCQ options per question (2-10, default: 4)
subjectstringoptionalSubject name
grade_levelstringoptionalGrade level
languagestringoptionalOutput language
focus_areastringoptionalTopics to focus on
custom_instructionsstringoptionalExtra instructions
descriptionstringoptionalPaper description
POST /api/question-papers/text Generate from pasted text Auth ▶
ParameterTypeRequiredDescription
source_textstringrequiredSource text (max 50,000 chars)
titlestringoptionalPaper title
question_typestringrequiredmcq, essay, short, mixed
question_countintegerrequired1-50
options_countintegeroptional2-10 (default: 4)
subjectstringoptionalSubject
grade_levelstringoptionalGrade level
languagestringoptionalOutput language
focus_areastringoptionalFocus topics
custom_instructionsstringoptionalExtra instructions
POST /api/question-papers/audio Generate from audio/video Auth ▶
ParameterTypeRequiredDescription
source_audiofile*Audio/video file
source_urlstring*YouTube/audio URL
source_langstringoptionalAudio language
titlestringoptionalPaper title
question_typestringrequiredmcq, essay, short, mixed
question_countintegerrequired1-50
options_countintegeroptional2-10
subjectstringoptionalSubject
grade_levelstringoptionalGrade level
languagestringoptionalOutput language
POST /api/question-papers/url Generate from a URL Auth ▶
ParameterTypeRequiredDescription
source_urlstringrequiredURL to extract content from
titlestringoptionalPaper title
question_typestringrequiredmcq, essay, short, mixed
question_countintegerrequired1-50
options_countintegeroptional2-10
subjectstringoptionalSubject
grade_levelstringoptionalGrade level
languagestringoptionalOutput language
🃏 Flashcards
GET /api/documents/{paper}/flashcards Get flashcard deck Auth ▶

Returns flashcard data for a document generated with note_style: flashcard_deck.

POST /api/documents/{paper}/flashcards/rate Rate a flashcard Auth ▶
ParameterTypeRequiredDescription
card_indexintegerrequiredIndex of the card (0-based)
ratingstringrequiredeasy, medium, hard
GET /api/flashcards/{token} View shared flashcards Public ▶

Public endpoint — no auth required. Access shared flashcard deck by token.

🌐 Translations
POST /api/translations/file Translate from file Auth ▶
ParameterTypeRequiredDescription
source_pdffilerequiredFile to translate
target_languagestringrequiredTarget language
source_languagestringoptionalSource language (auto-detect if omitted)
POST /api/translations/text Translate from text Auth ▶
ParameterTypeRequiredDescription
source_textstringrequiredText to translate (max 50,000)
target_languagestringrequiredTarget language
source_languagestringoptionalSource language
POST /api/translations/audio Translate from audio Auth ▶
ParameterTypeRequiredDescription
source_audiofile*Audio file
source_urlstring*Audio URL
target_languagestringrequiredTarget language
source_languagestringoptionalSource language
POST /api/translations/url Translate from URL Auth ▶
ParameterTypeRequiredDescription
source_urlstringrequiredURL to translate
target_languagestringrequiredTarget language
source_languagestringoptionalSource language
🎯 Quizzes
GET /api/quizzes List user's quizzes Auth ▶
ParameterTypeRequiredDescription
pageintegeroptionalPage number
POST /api/quizzes Create a quiz manually Auth ▶
ParameterTypeRequiredDescription
titlestringrequiredQuiz title
descriptionstringoptionalQuiz description
questionsarrayrequiredArray of question objects
questions[].question_textstringrequiredQuestion text
questions[].question_typestringrequiredmcq, short, essay
questions[].optionsarrayoptionalMCQ options array
questions[].correct_answerstringrequiredCorrect answer
questions[].explanationstringoptionalAnswer explanation
POST /api/quizzes/ai-generate AI-generate quiz questions Auth ▶
ParameterTypeRequiredDescription
topicstring*Topic description
source_pdffile*Source PDF (alternative to topic)
countintegeroptionalNumber of questions (default: 5)
options_countintegeroptionalOptions per MCQ (2-10, default: 4)
languagestringoptionalenglish, sinhala, tamil
GET /api/quizzes/{quiz} Get quiz details Auth ▶

Returns quiz with all questions, share token, and settings.

PUT /api/quizzes/{quiz} Update quiz Auth ▶
ParameterTypeRequiredDescription
titlestringoptionalQuiz title
descriptionstringoptionalDescription
pinstringoptionalPIN protection
DELETE /api/quizzes/{quiz} Delete quiz Auth ▶

Permanently deletes the quiz and all attempts.

POST /api/quizzes/{quiz}/publish Publish quiz (generate share link) Auth ▶
Response (200)
{
    "success": true,
    "data": {
        "share_url": "https://shortme.lk/quiz/abc123...",
        "short_url": "https://shortme.lk/q/xyz"
    }
}
POST /api/quizzes/{quiz}/start Start quiz session Auth ▶

Starts the quiz for participants. Sets status to live.

POST /api/quizzes/{quiz}/close Close quiz Auth ▶

Closes the quiz — no more submissions accepted.

GET /api/quizzes/{quiz}/participants List participants Auth ▶

Returns all participants with scores and answers.

GET /api/quizzes/{quiz}/report Get quiz analytics report Auth ▶

Returns per-question analytics, scores, and performance breakdown.

GET /api/quizzes/{quiz}/export Export results as CSV Auth ▶

Returns CSV file download with all participant results.

POST /api/quizzes/{quiz}/duplicate Duplicate quiz Auth ▶

Creates a copy of the quiz with all questions.

GET /api/quiz/{shareToken} Get quiz for taking (public) Public ▶

Returns quiz questions for participants. No auth required.

POST /api/quiz/{shareToken}/submit Submit quiz answers (public) Public ▶
ParameterTypeRequiredDescription
answersobjectrequiredMap of question_id => answer
namestringoptionalParticipant name
POST /api/quiz/{shareToken}/verify-pin Verify quiz PIN (public) Public ▶
ParameterTypeRequiredDescription
pinstringrequiredPIN code
GET /api/quiz/{shareToken}/results/{attempt} Get quiz results (public) Public ▶

Returns results for a specific attempt including score, correct answers, and explanations.

📚 AI Books
GET /api/books List user's books Auth ▶
POST /api/books Generate a new book Auth ▶
ParameterTypeRequiredDescription
titlestringrequiredBook title (max 500)
descriptionstringrequiredBook description/topic (max 2000)
authorstringoptionalAuthor name
languagestringrequiredLanguage code (english, sinhala, tamil, etc.)
page_countintegerrequiredNumber of pages (5 to plan max)
book_stylestringrequiredtextbook, narrative, reference, children, friendly, high_level
proofreadstringoptionalon to enable (Ultra only)
scope_limitstringoptionalon to limit to references (Ultra only)
insert_imagesstringoptionalon to add AI images (Ultra only)
image_countintegeroptionalNumber of images (1-20)
referencesfile[]optionalReference PDFs/DOCX (max 5, Ultra only)
special_instructionsstringoptionalExtra instructions (max 2000)
GET /api/books/{book} Get book details Auth ▶
GET /api/books/{book}/progress Get generation progress Auth ▶
POST /api/books/{book}/cancel Cancel generation Auth ▶
POST /api/books/{book}/retry Retry failed generation Auth ▶
GET /api/books/{book}/download/{format} Download book Auth ▶
ParameterTypeRequiredDescription
formatstringrequiredpdf or docx
DELETE /api/books/{book} Delete book Auth ▶
🎨 Presentations
GET /api/presentations List presentations Auth ▶
POST /api/presentations Generate presentation Auth ▶
ParameterTypeRequiredDescription
titlestringrequiredPresentation title (max 500)
descriptionstringoptionalDescription (max 2000)
languagestringrequiredenglish, sinhala, tamil
slide_countintegerrequiredNumber of slides (4 to plan max)
source_pdffileoptionalSource file
source_textstringoptionalSource text (max 50,000)
source_urlstringoptionalSource URL
GET /api/presentations/{presentation} Get presentation details Auth ▶
GET /api/presentations/{presentation}/download Download PPTX Auth ▶
DELETE /api/presentations/{presentation} Delete presentation Auth ▶
🧑‍🏫 AI Coaches & Tutoring
GET /api/ai-coaches List coaches & templates Auth ▶
POST /api/ai-coaches Create custom tutor Auth ▶
ParameterTypeRequiredDescription
namestringrequiredTutor name
subjectstringrequiredSubject area
descriptionstringoptionalTutor description
system_promptstringoptionalCustom system prompt
grade_levelstringoptionalGrade level
languagestringoptionalLanguage
POST /api/ai-coaches/{coach}/clone Clone a template tutor Auth ▶

Creates a personal copy of a template coach.

POST /api/ai-coaches/{coach}/sessions Start new chat session Auth ▶
ParameterTypeRequiredDescription
titlestringoptionalSession title
POST /api/ai-coaches/sessions/{session}/message Send message to tutor Auth ▶
ParameterTypeRequiredDescription
messagestringrequiredYour message (max 5000)
Response (200)
{
    "success": true,
    "data": {
        "response": "AI tutor response text...",
        "session": { "total_questions": 5, "correct_answers": 3, "accuracy": 60 }
    }
}
POST /api/ai-coaches/sessions/{session}/assessment Generate practice assessment Auth ▶

AI generates assessment questions based on the tutoring session context.

POST /api/ai-coaches/sessions/{session}/submit-answer Submit assessment answers Auth ▶
ParameterTypeRequiredDescription
answersarrayrequiredArray of answer strings
POST /api/ai-coaches/{coach}/references Upload reference material Auth ▶
ParameterTypeRequiredDescription
filefilerequiredPDF, DOCX, or PPTX (max 200MB)
🔮 Exam Predictor
GET /api/exam-predictions List predictions Auth ▶
POST /api/exam-predictions Generate exam prediction Auth ▶
ParameterTypeRequiredDescription
titlestringrequiredPrediction title (max 500)
subjectstringoptionalSubject
grade_levelstringoptionalGrade level
languagestringrequiredenglish, sinhala, tamil
source_textstring*Paste study text
source_filefile*Upload PDF/DOCX/PPTX
source_filesfile[]*Upload multiple files
modestringrequiredprediction or question_generator
difficulty_levelstringoptionaleasy, medium, hard (question_generator mode)
question_typestringoptionalmcq, essay, short, mixed
question_countintegeroptional1-50
options_countintegeroptional2-10

* Provide at least one of: source_text, source_file, or source_files.

GET /api/exam-predictions/{prediction} Get prediction details Auth ▶
GET /api/exam-predictions/{prediction}/download/{format} Download prediction Auth ▶
ParameterTypeRequiredDescription
formatstringrequiredpdf, markdown, or questions
GET /api/exam-predictor/shared/{shareToken} View shared prediction Public ▶

Public endpoint — view a shared exam prediction by token.

📊 Pass Predictor
POST /api/pass-predictions/paper/{paper} Predict from paper answers Auth ▶
ParameterTypeRequiredDescription
answersarrayrequiredArray of student answers (one per question)
Response (200)
{
    "success": true,
    "data": {
        "prediction": {
            "id": 1, "title": "...", "grade": "B+",
            "pass_probability": 78, "verdict": "Likely Pass",
            "strengths": [...], "weaknesses": [...],
            "recommendation": "...", "marks_awarded": 65, "total_marks": 100
        }
    }
}
POST /api/pass-predictions/coach/{session} Predict from coaching session Auth ▶

Analyzes coaching session performance to predict exam outcome.

GET /api/pass-predictions List predictions Auth ▶
✍️ AI Text Humanizer
POST /api/humanize/text Humanize pasted text Auth ▶
ParameterTypeRequiredDescription
textstringrequiredAI text to humanize (min 20, max 50,000 chars)
languagestringrequiredenglish, sinhala, tamil
tonestringrequirednatural, professional, casual, academic
Response (200)
{
    "success": true,
    "data": {
        "humanized_text": "The rewritten natural-sounding text...",
        "original_length": 1250,
        "humanized_length": 1180
    }
}
POST /api/humanize/file Humanize text from file Auth ▶
ParameterTypeRequiredDescription
filefilerequiredTXT, PDF, or DOCX (max 10MB)
languagestringrequiredenglish, sinhala, tamil
tonestringrequirednatural, professional, casual, academic
🎙️ Audio to Text Transcription
POST /api/audio-to-text Upload audio/video for transcription Auth ▶
ParameterTypeRequiredDescription
audiofile*Audio/video file (MP3, WAV, M4A, MP4, etc.)
source_urlstring*YouTube or audio URL
languagestringoptionalAudio language code
Response (201)
{
    "success": true,
    "data": {
        "job": { "id": "01J...", "status": "pending" },
        "message": "Transcription started. Poll /api/audio-to-text/{id} for status."
    }
}
GET /api/audio-to-text List transcription history Auth ▶
GET /api/audio-to-text/{audioJob} Get transcription status Auth ▶
POST /api/audio-to-text/{audioJob}/optimize AI-optimize transcript Auth ▶

Uses AI to improve transcript accuracy and formatting.

POST /api/audio-to-text/{audioJob}/generate-notes Generate notes from transcript Auth ▶

Creates short notes from the transcribed text.

POST /api/audio-to-text/{audioJob}/generate-paper Generate question paper from transcript Auth ▶

Creates a question paper from the transcribed content.

GET /api/audio-to-text/{audioJob}/download/{format} Download transcript Auth ▶
ParameterTypeRequiredDescription
formatstringrequiredpdf, docx, or txt
POST /api/audio-to-text/{audioJob}/share Generate share link Auth ▶
GET /api/shared/transcript/{shareToken} View shared transcript Public ▶
📸 Snap & Solve
POST /api/snap/answer Upload image, get AI answer Auth ▶
ParameterTypeRequiredDescription
imagefilerequiredImage file (max 10MB)
languagestringoptionalResponse language (default: english)
Response (200)
{
    "success": true,
    "data": {
        "answer": "The solution to the problem is...",
        "explanation": "Step by step...",
        "share_token": "abc123..."
    }
}
GET /api/snap/{snap} Get snap question details Auth ▶
🛠️ AI Mini Tools

All mini tools return complete JSON responses (non-streaming). Each generates AI content and returns it in a single response.

POST /api/mini-tools/song Song Writer Auth ▶
ParameterTypeRequiredDescription
topicstringrequiredSong description (max 500)
languagestringoptionalenglish, sinhala, tamil
Response (200)
{
    "success": true,
    "data": {
        "content": "Generated content in Markdown...",
        "proofread": "Review and improved version..."
    }
}
POST /api/mini-tools/essay Essay Writer Auth ▶
ParameterTypeRequiredDescription
topicstringrequiredEssay topic (max 500)
languagestringoptionalenglish, sinhala, tamil
Response (200)
{
    "success": true,
    "data": {
        "content": "Generated content in Markdown...",
        "proofread": "Review and improved version..."
    }
}
POST /api/mini-tools/story Story Generator Auth ▶
ParameterTypeRequiredDescription
topicstringrequiredStory topic (max 500)
languagestringoptionalenglish, sinhala, tamil
Response (200)
{
    "success": true,
    "data": {
        "content": "Generated content in Markdown...",
        "proofread": "Review and improved version..."
    }
}
POST /api/mini-tools/whatsapp-status WhatsApp Status Auth ▶
ParameterTypeRequiredDescription
topicstringrequiredStatus topic (max 500)
languagestringoptionalenglish, sinhala, tamil
Response (200)
{
    "success": true,
    "data": {
        "content": "Generated content in Markdown...",
        "proofread": "Review and improved version..."
    }
}
POST /api/mini-tools/math-solver Math Solver Auth ▶
ParameterTypeRequiredDescription
problemstringoptional*Math problem text (max 2000)
imagestringoptional*Base64 image of problem
languagestringoptionalenglish, sinhala, tamil
Response (200)
{
    "success": true,
    "data": {
        "content": "Generated content in Markdown...",
        "proofread": "Review and improved version..."
    }
}
POST /api/mini-tools/horoscope Horoscope Auth ▶
ParameterTypeRequiredDescription
namestringrequiredPerson name (max 100)
zodiacstringrequiredZodiac sign (Aries..Pisces)
languagestringoptionalenglish, sinhala, tamil
detailsstringoptionalPersonal details (max 500)
dobdateoptionalDate of birth
tobstringoptionalTime of birth (HH:MM)
pobstringoptionalPlace of birth (max 100)
genderstringoptionalmale, female, other
Response (200)
{
    "success": true,
    "data": {
        "content": "Generated content in Markdown...",
        "proofread": "Review and improved version..."
    }
}
POST /api/mini-tools/study-planner Study Planner Auth ▶
ParameterTypeRequiredDescription
subjectsstringrequiredSubjects/topics (max 500)
languagestringoptionalenglish, sinhala, tamil
Response (200)
{
    "success": true,
    "data": {
        "content": "Generated content in Markdown...",
        "proofread": "Review and improved version..."
    }
}
POST /api/mini-tools/speech Speech Writer Auth ▶
ParameterTypeRequiredDescription
occasionstringrequiredSpeech occasion (max 500)
languagestringoptionalenglish, sinhala, tamil
Response (200)
{
    "success": true,
    "data": {
        "content": "Generated content in Markdown...",
        "proofread": "Review and improved version..."
    }
}
POST /api/mini-tools/quotes Quote Generator Auth ▶
ParameterTypeRequiredDescription
topicstringrequiredQuote topic (max 500)
languagestringoptionalenglish, sinhala, tamil
Response (200)
{
    "success": true,
    "data": {
        "content": "Generated content in Markdown...",
        "proofread": "Review and improved version..."
    }
}
POST /api/mini-tools/name-generator Name Generator Auth ▶
ParameterTypeRequiredDescription
purposestringrequiredNaming purpose (max 500)
languagestringoptionalenglish, sinhala, tamil
Response (200)
{
    "success": true,
    "data": {
        "content": "Generated content in Markdown...",
        "proofread": "Review and improved version..."
    }
}
POST /api/mini-tools/recipe Recipe Generator Auth ▶
ParameterTypeRequiredDescription
ingredientsstringrequiredAvailable ingredients (max 500)
languagestringoptionalenglish, sinhala, tamil
Response (200)
{
    "success": true,
    "data": {
        "content": "Generated content in Markdown...",
        "proofread": "Review and improved version..."
    }
}
📑 PDF Tools

All PDF tools accept file uploads via multipart/form-data and return JSON with download URLs.

POST /api/pdf-tools/compress Compress PDF Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filefilerequiredPDF file (max 50MB)
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
POST /api/pdf-tools/merge Merge PDFs Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filesfile[]required2-10 PDF files
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
POST /api/pdf-tools/split Split PDF Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filefilerequiredPDF file
pagesstringrequiredPages like "1-3,5,7-10"
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
POST /api/pdf-tools/rotate Rotate Pages Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filefilerequiredPDF file
rotationintegerrequired90, 180, or 270
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
POST /api/pdf-tools/extract-pages Extract Pages Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filefilerequiredPDF file
pagesstringrequiredPages to extract
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
POST /api/pdf-tools/extract-text Extract Text Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filefilerequiredPDF file
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
POST /api/pdf-tools/to-images PDF to Images Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filefilerequiredPDF file
dpiintegeroptional72-300 (default: 150)
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
POST /api/pdf-tools/protect Protect PDF Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filefilerequiredPDF file
passwordstringrequiredPassword (min 4 chars)
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
POST /api/pdf-tools/unlock Unlock PDF Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filefilerequiredProtected PDF
passwordstringrequiredCurrent password
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
POST /api/pdf-tools/images-to-pdf Images to PDF Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
imagesfile[]required1-20 JPG/PNG images
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
POST /api/pdf-tools/watermark Add Watermark Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filefilerequiredPDF file
textstringrequiredWatermark text
opacitynumberoptional0-1 (default: 0.3)
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
POST /api/pdf-tools/info PDF Info Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filefilerequiredPDF file
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
POST /api/pdf-tools/convert-to-markdown PDF to Markdown Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filefilerequiredPDF file
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
POST /api/pdf-tools/ai-summary AI Summary Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filefilerequiredPDF file
languagestringoptionalSummary language
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
POST /api/pdf-tools/describe-image AI Describe Image Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filefilerequiredPDF file
pageintegerrequiredPage number
languagestringoptionalDescription language
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
POST /api/pdf-tools/pdf-to-word PDF to Word Auth ▶

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
filefilerequiredPDF file (Ultra plan)
Response (200)
{
    "success": true,
    "data": {
        "download_url": "/api/pdf-tools/download?path=...",
        "filename": "compressed_output.pdf",
        "size": 1024000
    }
}
📊 Office Tools (Excel/CSV)
POST /api/office-tools/upload Upload spreadsheet Auth ▶
ParameterTypeRequiredDescription
filefilerequiredXLSX, XLS, or CSV (max 10MB)
GET /api/office-tools/files List uploaded files Auth ▶
POST /api/office-tools/analyze AI-analyze spreadsheet Auth ▶
ParameterTypeRequiredDescription
pathstringrequiredFile path from upload response
POST /api/office-tools/charts/generate Generate chart from data Auth ▶
ParameterTypeRequiredDescription
pathstringrequiredFile path
chart_typestringrequiredbar, line, pie, scatter, etc.
x_columnstringrequiredX-axis column name
y_columnstringrequiredY-axis column name
POST /api/office-tools/dashboard/generate Generate HTML dashboard Auth ▶
ParameterTypeRequiredDescription
pathstringrequiredFile path

ShortMe.lk API v1 — Built with Laravel 13 + Sanctum

Base URL: https://shortme.lk/api