Ask
The /ask endpoint is the core of LawyerGPT. It allows users to query legal questions and receive AI-generated responses trained on curated legal data
Endpoint
POST https://api.lawyergptai.cc/v1/ask
Request Body
Send a JSON payload with the user's query and optional parameters.
{
"question": "Can my landlord evict me without notice?",
"jurisdiction": "US-CA",
"language": "en"
}
Request Parameters
Parameter
Type
Required
Description
question
string
โ
The legal question you're asking
jurisdiction
string
โ
ISO-style region code (e.g., US-NY
, UK
, PL
)
language
string
โ
Response language (default: en
)
Response
The API will return an AI-generated legal explanation. While the model is not a licensed attorney, it provides simplified guidance based on known legal data.
{
"answer": "In California, a landlord typically cannot evict a tenant without proper notice. For most cases, a 30-day or 60-day notice is required unless it's an emergency eviction.",
"confidence": 0.82,
"source_hint": ["California Civil Code ยง 1946.1"]
}
Last updated