Build with
Legal Intelligence
Integrate powerful legal AI capabilities directly into your applications. Our API provides access to the lexiber-1.0 model, specialized in Pakistani law and legal reasoning.
Authentication
The Lexiber AI API uses API keys to authenticate requests. You can view and manage your API keys in the Developer Dashboard.
Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth password value. You do not need to provide a username.
Security Notice
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
Chat Completions
Generate a legal response based on user input using your API Key. This endpoint is compatible with standard chat completion formats.
Headers
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | REQUIRED | The model to use. Must be lexiber-1.0. |
| messages | array | REQUIRED | A list of messages comprising the conversation so far. |
Message Object
{
"role": "user",
"content": "What are the rights of a citizen under Article 9?"
}Example Request
curl -X POST https://api.lexiber.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk_12345" \
-d '{
"model": "lexiber-1.0",
"messages": [
{"role": "user", "content": "Explain the concept of bail in non-bailable offenses."}
]
}'