curl --request POST \
--url 'https://api.example.com/api/case-study/*' \
--header 'Content-Type: application/json' \
--data '
{
"caseData": {},
"userAnalysis": "<string>",
"userBrief": {},
"researchQuery": "<string>",
"userSources": "<string>",
"documentType": "<string>",
"userWriting": "<string>",
"assignment": "<string>",
"caseScenario": "<string>",
"userArgument": "<string>",
"side": "<string>",
"scenario": "<string>",
"userResponse": "<string>",
"jurisdiction": "<string>"
}
'{
"score": 123,
"feedback": "<string>",
"suggestions": [
{}
],
"analysis": {},
"sourcesAnalysis": "<string>",
"missingPrecedents": [
{}
],
"suggestedResearch": "<string>",
"modelSources": [
{}
],
"clarity": 123,
"organization": 123,
"legalAnalysis": 123,
"citation": 123,
"grammar": 123,
"overallFeedback": "<string>",
"strengthPoints": [
{}
],
"improvementAreas": [
{}
],
"suggestedRevisions": [
{}
],
"modelExample": "<string>",
"persuasiveness": 123,
"legalReasoning": 123,
"caseUsage": 123,
"delivery": 123,
"counterArguments": [
{}
],
"benchQuestions": [
{}
],
"ethicalAnalysis": 123,
"ruleIdentification": 123,
"conflictResolution": 123,
"professionalJudgment": 123,
"relevantRules": [
{}
],
"ethicalConsiderations": [
{}
],
"alternativeApproaches": [
{}
],
"potentialConsequences": [
{}
],
"modelResponse": "<string>"
}Comprehensive case study analysis endpoints powered by OpenAI for legal education
curl --request POST \
--url 'https://api.example.com/api/case-study/*' \
--header 'Content-Type: application/json' \
--data '
{
"caseData": {},
"userAnalysis": "<string>",
"userBrief": {},
"researchQuery": "<string>",
"userSources": "<string>",
"documentType": "<string>",
"userWriting": "<string>",
"assignment": "<string>",
"caseScenario": "<string>",
"userArgument": "<string>",
"side": "<string>",
"scenario": "<string>",
"userResponse": "<string>",
"jurisdiction": "<string>"
}
'{
"score": 123,
"feedback": "<string>",
"suggestions": [
{}
],
"analysis": {},
"sourcesAnalysis": "<string>",
"missingPrecedents": [
{}
],
"suggestedResearch": "<string>",
"modelSources": [
{}
],
"clarity": 123,
"organization": 123,
"legalAnalysis": 123,
"citation": 123,
"grammar": 123,
"overallFeedback": "<string>",
"strengthPoints": [
{}
],
"improvementAreas": [
{}
],
"suggestedRevisions": [
{}
],
"modelExample": "<string>",
"persuasiveness": 123,
"legalReasoning": 123,
"caseUsage": 123,
"delivery": 123,
"counterArguments": [
{}
],
"benchQuestions": [
{}
],
"ethicalAnalysis": 123,
"ruleIdentification": 123,
"conflictResolution": 123,
"professionalJudgment": 123,
"relevantRules": [
{}
],
"ethicalConsiderations": [
{}
],
"alternativeApproaches": [
{}
],
"potentialConsequences": [
{}
],
"modelResponse": "<string>"
}POST /api/case-study/analyze
Analyzes user’s case analysis using the IRAC (Issue, Rule, Application, Conclusion) framework.
title: Case titlefacts: Case facts (max 300 chars used)question: Legal question (max 150 chars used)facts: 1-2 sentence summaryissue: 1 sentence issue statementrule: 1 sentence rule statementapplication: 2 sentence applicationconclusion: 1 sentence conclusion/workspace/source/src/app/api/case-study/analyze/route.ts:8,42-54
curl -X POST 'https://api.lsattraining.com/api/case-study/analyze' \
-H 'Content-Type: application/json' \
-d '{
"caseData": {
"title": "Smith v. Jones",
"facts": "A contract dispute where the defendant failed to deliver goods as specified in a written agreement...",
"question": "Did the defendant breach the contract?"
},
"userAnalysis": "The defendant breached the contract by failing to deliver. Under UCC Article 2, a seller must deliver goods conforming to the contract. Here, the goods were not delivered, constituting a material breach."
}'
{
"score": 0.85,
"feedback": "Strong analysis with clear identification of the breach and applicable law. Consider discussing potential remedies and damages.",
"suggestions": [
"Add analysis of perfect tender rule",
"Discuss buyer's remedies under UCC 2-711"
],
"analysis": {
"facts": "Seller failed to deliver contracted goods. Written agreement exists.",
"issue": "Whether failure to deliver constitutes material breach.",
"rule": "UCC Article 2 requires conforming delivery.",
"application": "Defendant's non-delivery violates the perfect tender rule. No substantial performance occurred.",
"conclusion": "Defendant materially breached the contract."
}
}
POST /api/case-study/analyze-brief
Evaluates the quality of a user’s case brief using custom analysis algorithms.
issue: Issue statementrule: Rule statementanalysis: Legal analysisconclusion: Conclusionissue: Correct issueholding: Correct holding/rulereasoning: Correct reasoning/workspace/source/src/lib/ai.ts:96-183
/workspace/source/src/lib/ai.ts:173-183
curl -X POST 'https://api.lsattraining.com/api/case-study/analyze-brief' \
-H 'Content-Type: application/json' \
-d '{
"userBrief": {
"issue": "Whether silence constitutes acceptance",
"rule": "Silence generally does not constitute acceptance",
"analysis": "The offeree did not respond, which under common law does not create a contract",
"conclusion": "No contract was formed"
},
"caseData": {
"issue": "Whether silence can constitute acceptance when there is a prior course of dealing",
"holding": "Silence may constitute acceptance when parties have established a pattern of conduct",
"reasoning": "Prior dealings created a reasonable expectation that silence meant acceptance"
}
}'
{
"feedback": "Good analysis with some areas for improvement. Good issue spotting, but consider additional legal questions. Clear and accurate statement of the legal rules. Good analysis, but could develop arguments further. Reasonable conclusion, but could be better supported."
}
POST /api/case-study/case-research
Evaluates the quality of legal research and sources provided by the user.
/workspace/source/src/app/api/case-study/case-research/route.ts:31-43
curl -X POST 'https://api.lsattraining.com/api/case-study/case-research' \
-H 'Content-Type: application/json' \
-d '{
"researchQuery": "Liability for negligent misrepresentation in real estate transactions",
"userSources": "Restatement (Second) of Torts § 552, Williams v. Polgar, local state statutes on disclosure requirements"
}'
{
"score": 0.88,
"feedback": "Strong research foundation with relevant Restatement section and case law. Good inclusion of state-specific disclosure requirements.",
"sourcesAnalysis": "Restatement § 552 is the primary authority. Williams v. Polgar provides relevant precedent. State disclosure statutes add jurisdiction-specific context.",
"missingPrecedents": [
"Markov v. ABC Transfer & Storage Co.",
"UCC § 2-313 for warranty considerations"
],
"suggestedResearch": "Explore buyer's duty to investigate and comparative negligence defenses. Research recent state supreme court decisions on seller disclosure obligations.",
"modelSources": [
"Restatement (Second) of Torts § 552",
"Williams v. Polgar",
"Markov v. ABC Transfer & Storage Co.",
"State Real Estate Disclosure Act"
]
}
POST /api/case-study/legal-writing
Provides comprehensive feedback on legal writing quality across multiple dimensions.
/workspace/source/src/app/api/case-study/legal-writing/route.ts:39-51
curl -X POST 'https://api.lsattraining.com/api/case-study/legal-writing' \
-H 'Content-Type: application/json' \
-d '{
"documentType": "Memo",
"assignment": "Memorandum analyzing whether client has valid negligence claim",
"userWriting": "MEMORANDUM\nTO: Senior Partner\nFROM: Associate\nRE: Smith Negligence Claim\n\nThe client may have a valid negligence claim. The defendant owed a duty of care as a property owner. The defendant breached this duty by failing to maintain the premises. The client suffered injuries as a direct result. Damages include medical expenses and lost wages."
}'
{
"clarity": 0.85,
"organization": 0.80,
"legalAnalysis": 0.75,
"citation": 0.70,
"grammar": 0.90,
"overallFeedback": "Clear and well-organized memo structure. Legal analysis covers the basic elements but needs more depth. Add case citations and expand on causation analysis.",
"strengthPoints": [
"Professional memo format",
"Clear identification of negligence elements",
"Concise writing style"
],
"improvementAreas": [
"Lacks case law citations",
"Causation analysis is conclusory",
"No discussion of potential defenses"
],
"suggestedRevisions": [
"Add citations to support each element of negligence",
"Develop the breach analysis with specific facts",
"Include a discussion of assumption of risk or contributory negligence",
"Expand damages section with more specific calculations"
],
"modelExample": "The defendant breached the duty of care owed to invitees by failing to repair a known defect in the stairway. See Restatement (Second) of Torts § 343. The defendant had actual notice of the loose handrail for three weeks prior to the incident, as evidenced by the maintenance logs."
}
POST /api/case-study/moot-court
Evaluates oral advocacy performance in moot court arguments.
/workspace/source/src/app/api/case-study/moot-court/route.ts:38-50
curl -X POST 'https://api.lsattraining.com/api/case-study/moot-court' \
-H 'Content-Type: application/json' \
-d '{
"caseScenario": "First Amendment challenge to university speech code",
"side": "Appellant",
"userArgument": "May it please the Court. The university speech code is unconstitutional viewpoint discrimination. Under R.A.V. v. City of St. Paul, the government cannot regulate speech based on its message. The code selectively prohibits certain offensive speech while allowing other offensive speech, violating the First Amendment. We ask the Court to strike down the policy."
}'
{
"persuasiveness": 0.82,
"legalReasoning": 0.85,
"caseUsage": 0.80,
"delivery": 0.78,
"overallFeedback": "Strong opening with appropriate citation to R.A.V. Legal reasoning is sound regarding viewpoint discrimination. Consider addressing the university's interest in maintaining educational environment.",
"strengthPoints": [
"Proper courtroom etiquette with 'May it please the Court'",
"Effective use of R.A.V. precedent",
"Clear identification of constitutional issue"
],
"improvementAreas": [
"Address potential limited public forum argument",
"Discuss Tinker standard for student speech",
"Prepare response to compelling interest arguments"
],
"counterArguments": [
"University has compelling interest in preventing harassment",
"Speech code is narrowly tailored content-neutral regulation",
"Educational setting allows for greater speech restrictions"
],
"benchQuestions": [
"How do you distinguish this from Tinker v. Des Moines?",
"What is your standard for reviewing university speech codes?",
"Doesn't the university have a compelling interest in maintaining an educational environment?"
]
}
POST /api/case-study/legal-ethics
Analyzes responses to legal ethics scenarios based on professional conduct rules.
/workspace/source/src/app/api/case-study/legal-ethics/route.ts:36-48
curl -X POST 'https://api.lsattraining.com/api/case-study/legal-ethics' \
-H 'Content-Type: application/json' \
-d '{
"scenario": "A client confides that they plan to commit perjury in an upcoming trial. What should the attorney do?",
"userResponse": "The attorney should withdraw from representation if the client insists on committing perjury. Under Model Rule 3.3, a lawyer has a duty of candor to the tribunal and cannot knowingly offer false evidence. The attorney should first counsel the client against perjury, but if the client persists, must take remedial measures including withdrawal.",
"jurisdiction": "Model Rules of Professional Conduct"
}'
{
"ethicalAnalysis": 0.90,
"ruleIdentification": 0.95,
"conflictResolution": 0.85,
"professionalJudgment": 0.88,
"overallFeedback": "Excellent identification of the ethical issue and proper citation to Model Rule 3.3. Your response demonstrates strong understanding of the duty of candor to the tribunal and appropriate remedial measures.",
"relevantRules": [
"Model Rule 3.3 (Candor Toward the Tribunal)",
"Model Rule 1.6 (Confidentiality)",
"Model Rule 1.16 (Declining or Terminating Representation)"
],
"ethicalConsiderations": [
"Duty of candor to tribunal vs. duty of confidentiality to client",
"Client autonomy and right to testify",
"Attorney's role as officer of the court",
"Timing of withdrawal to avoid prejudice"
],
"alternativeApproaches": [
"Remonstrate with client about consequences of perjury",
"Allow narrative testimony without direct examination",
"Seek to withdraw before testimony occurs",
"Disclose to tribunal if withdrawal denied (jurisdiction-dependent)"
],
"potentialConsequences": [
"Withdrawal may alert court to issue",
"Client could face perjury charges",
"Attorney could face disciplinary action for complicity",
"Late withdrawal could prejudice client's case"
],
"modelResponse": "Under Model Rule 3.3(a)(3), I cannot knowingly offer false testimony. I would first counsel the client about the serious consequences of perjury and my ethical obligations. If the client persists, I must take remedial measures. I would seek to withdraw under Rule 1.16(a)(1), as continuing would require me to violate the Rules of Professional Conduct. If the court denies withdrawal, I may need to consider the narrative approach, though jurisdictions vary on this issue."
}
{
"error": "[Specific missing parameter] required"
}
{
"error": "[Analysis type] failed",
"score": 0,
"feedback": "Please try again...",
// ... other default fields
}
/workspace/source/src/app/api/case-study/analyze/route.ts/workspace/source/src/app/api/case-study/analyze-brief/route.ts/workspace/source/src/app/api/case-study/case-research/route.ts/workspace/source/src/app/api/case-study/legal-writing/route.ts/workspace/source/src/app/api/case-study/moot-court/route.ts/workspace/source/src/app/api/case-study/legal-ethics/route.ts/workspace/source/src/lib/ai.ts