The Writing Analysis API evaluates bar exam essay responses and performance test submissions, providing detailed feedback on structure, legal analysis, and writing quality.Endpoint: POST /api/writing/analyze
curl -X POST 'https://api.example.com/api/writing/analyze' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_SESSION_TOKEN' \ -d '{ "type": "essay", "content": "The issue is whether the search violated the Fourth Amendment. The Fourth Amendment protects against unreasonable searches and seizures. Under the exclusionary rule, evidence obtained in violation of the Fourth Amendment must be suppressed. Here, the officer conducted a warrantless search of the vehicle after a traffic stop. While automobile searches have reduced privacy expectations, the officer exceeded the scope by searching the locked glove compartment without probable cause. Therefore, the evidence should be suppressed as fruit of the poisonous tree." }'
Response
{ "structure": 0.85, "legalAnalysis": 0.90, "writingQuality": 0.88, "structureFeedback": "Excellent use of IRAC structure. The issue is clearly stated, followed by the rule, application, and conclusion. Consider adding a brief facts section at the beginning.", "legalAnalysisFeedback": "Strong constitutional analysis with good application of Fourth Amendment principles. The reasoning about automobile exception is solid. Consider citing specific cases like Carroll v. United States or Arizona v. Gant to strengthen the analysis.", "writingQualityFeedback": "Clear, concise writing with professional legal tone. Transitions between sections are smooth. Minor improvement: vary sentence structure slightly to enhance readability.", "suggestions": [ "Add case citations to support Fourth Amendment analysis (Carroll v. United States, Arizona v. Gant)", "Include a brief facts section before the issue statement", "Expand discussion of probable cause standard for glove compartment search", "Consider discussing good faith exception as counterargument" ], "aiAnalysis": "This essay demonstrates strong command of Fourth Amendment search and seizure doctrine. The IRAC structure is well-executed with clear issue identification and rule application. The analysis correctly identifies the automobile exception while recognizing its limitations regarding locked containers. To elevate this response, incorporate specific case precedent and address potential counterarguments such as the good faith exception. The writing is professional and legally sound, showing excellent understanding of exclusionary rule principles."}
curl -X POST 'https://api.example.com/api/writing/analyze' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_SESSION_TOKEN' \ -d '{ "type": "performance", "content": "MEMORANDUM\nTO: Senior Partner\nFROM: Associate\nRE: Smith Contract Dispute\nDATE: March 15, 2024\n\nThis memo analyzes whether Smith has valid grounds to terminate the contract with Jones Corp. Based on the materials provided, Smith may terminate under the material breach provision. The contract requires delivery by March 1, but Jones delivered on March 10, nine days late. Under Section 5.2, material breaches allow termination. The delay caused Smith to lose the Johnson contract worth $500,000, constituting substantial harm. Therefore, Smith should proceed with termination and pursue damages." }'
Response
{ "structure": 0.78, "legalAnalysis": 0.82, "writingQuality": 0.85, "structureFeedback": "Good memo format with proper heading. The analysis would benefit from clearer section headers (Facts, Analysis, Conclusion) and more detailed treatment of each element.", "legalAnalysisFeedback": "Solid identification of the material breach issue. Good application of contract terms to facts. Consider analyzing the materiality factors more thoroughly and addressing potential counterarguments about substantial performance.", "writingQualityFeedback": "Professional memo format with clear, direct language. The writing is concise but could provide more detailed reasoning in key areas.", "suggestions": [ "Add section headers (Facts, Issue, Analysis, Conclusion) for better organization", "Expand analysis of materiality factors from Restatement (Second) of Contracts ยง241", "Address substantial performance doctrine as potential counterargument", "Include recommendation on damages calculation", "Discuss whether time was of the essence under the contract" ], "aiAnalysis": "This performance test response shows competent analysis of a contract dispute with proper memo formatting. The writer correctly identifies the breach and applies contract provisions to the facts. To improve, add more thorough analysis of materiality using the common law factors, address the substantial performance doctrine, and provide more detailed recommendations. The writing is clear and professional, demonstrating good understanding of contract remedies."}
Essay Prompt: Focuses on IRAC structure, constitutional/statutory analysis, case law application, and legal reasoning depth.Performance Test Prompt: Emphasizes organization of materials, synthesis of documents, memo/brief formatting, and practical legal writing skills.
Content is sent to OpenAI for analysis. Ensure no confidential or sensitive information is included in submissions.