Custom GPT Actions

Build Custom GPTs with AnrakLegal

Create your own Custom GPT with access to 588,024+ Indian legal documents. Use OpenAPI Custom Actions to add legal search, document retrieval, and case analysis capabilities to your GPT.

Different from MCP Connectors

ChatGPT uses a different protocol (OpenAPI/REST) than Claude Desktop (MCP). If you need Claude Desktop integration, visit the MCP Connectors page instead.

Quick Start

Get your ChatGPT connected in 3 simple steps

1

Get Your API Key

Sign in and generate an API key from the Console. Your key will start with ANRAK-

2

Get the OpenAPI Schema

Choose one of these methods to import the schema into ChatGPT:

Option A: Import from URL (Recommended)

https://anraklegal.fly.dev/api/openapi

Option B: Copy Schema Directly

3

Configure ChatGPT

In ChatGPT GPT Editor:

  1. Go to "Configure" → "Actions"
  2. Click "Create new action"
  3. Import the schema (paste URL or schema text)
  4. Set Authentication to "API Key"
  5. Choose "Custom" auth type
  6. Set header name: X-API-Key
  7. Paste your API key (ANRAK-xxxxx)
  8. Save and test!

Detailed Setup Guide

Step-by-step instructions with screenshots

1

Open ChatGPT and navigate to "Explore GPTs" → "Create a GPT"

Screenshot placeholder: GPT creation page

2

Go to "Configure" tab and scroll to "Actions" section

Screenshot placeholder: Actions section

3

Click "Create new action" and import the OpenAPI schema

Screenshot placeholder: Schema import

4

Configure authentication with your API key

Authentication Settings

Authentication Type:API Key
Auth Type:Custom
Header Name:X-API-Key
API Key:ANRAK-xxxxx-xxxxx

Available Actions

Your ChatGPT will have access to these legal research tools

searchCases

Search the Indian legal corpus with natural language queries. Returns judgments with metadata and insights.

Parameters: q (query), page, maxPages

getDocument

Retrieve complete judgment text, citations, and all document details for a specific case.

Parameters: docId

getDocumentMetadata

Get lightweight metadata for quick previews - title, court, date, and basic information.

Parameters: docId

getDocumentFragment

Extract specific sections from a judgment using a search query to find relevant paragraphs.

Parameters: docId, q (search query)

getUsageStats

Check your current API usage, daily limits, and remaining requests for your plan.

Parameters: None

Example Prompts

Try these prompts once your GPT is configured

"Search for Supreme Court cases about property disputes from 2023"

"Find recent trademark infringement cases from the Delhi High Court"

"What are the leading cases on breach of contract in Indian law?"

"Get the full judgment text for case ID 123456 and summarize the key points"

Rate Limits & Pricing

All ChatGPT requests count toward your daily API limit

FREE

3

requests per day

Free

STARTER

50

requests per day

₹1000/month

ADVANCED

unlimited requests

Contact us
View Pricing Details

Troubleshooting

Common issues and solutions

"Invalid API Key" Error

  • • Verify your API key starts with ANRAK-
  • • Check that the key is active in the Console
  • • Ensure header name is exactly: X-API-Key (case-sensitive)

"Daily Limit Exceeded" Error

  • • Check your current plan and limits in the Console
  • • Limits reset daily at midnight IST
  • • Upgrade your plan for higher limits

Actions Not Working

  • • Ensure the OpenAPI schema imported successfully
  • • Check that authentication is configured correctly
  • • Test with a simple query first
  • • Try saving and re-opening the GPT configuration

Need Help?

Visit our documentation or contact support for assistance

AnrakLegal - India's Premier Legal AI API | Verified Case Law & Statutes