API Documentation
Base URL: https://www.vigyanllm.in/api/v1
Authentication
All API requests require a Bearer token in the Authorization header:
Authorization: Bearer vly_sk_your_api_key_here
Generate keys from the API Keys page. Keys are scoped to specific endpoints and have configurable rate limits.
Rate Limits
Rate limits are per API key and vary by plan:
| Plan | Calls / Month | Rate Limit |
|---|---|---|
| Free | No API access | — |
| Pro (₹699/mo) | 1,000 | 30 req/min |
| Lab (₹1,999/mo) | 10,000 | 120 req/min |
Rate limit headers are returned with every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.
Endpoints
POST
/api/v1/primer/design
Design and validate PCR primers
Request Body (JSON):
{
"sequence": "ATGCGATCGATCG...", // Required: DNA sequence (≥100 bp)
"organism": "human", // Optional: human, mouse, rat, etc.
"amplicon_min": 70, // Optional: min amplicon size (default 70)
"amplicon_max": 200, // Optional: max amplicon size (default 200)
"tm_min": 58, // Optional: min Tm (default 58)
"tm_max": 65 // Optional: max Tm (default 65)
}
Response (200):
{
"status": "success",
"pairs": [
{
"forward": "GACCCCAAAATCAGCGAAAT",
"reverse": "TCTGGTTACTGCCAGTTGAATCTG",
"tm_fwd": 59.8,
"tm_rev": 60.1,
"gc_pct": 52.3,
"amplicon_size": 142,
"hairpin_dg": -1.2,
"self_dimer_dg": -3.4,
"cross_dimer_dg": -2.8,
"blast_specificity": "PASS",
"snp_risk": "LOW"
}
],
"job_id": "a1b2c3d4"
}
POST
/api/v1/blast/search
Run BLAST search against nr/nt database
Request Body (JSON):
{
"query": "GACCCCAAAATCAGCGAAAT", // Required: DNA/protein sequence
"database": "nr", // Optional: nr, nt, refseq_rna
"program": "blastn", // Optional: blastn, blastp, blastx
"evalue": 0.001 // Optional: E-value threshold
}
Response (200):
{
"status": "success",
"hits": [
{
"accession": "NM_007294.4",
"description": "BRCA1 DNA repair associated",
"score": 142,
"evalue": 2.1e-42,
"identity": 100,
"query_coverage": 100
}
],
"job_id": "e5f6g7h8"
}
POST
/api/v1/msa/align
Multiple sequence alignment (Clustal Omega)
Request Body (JSON):
{
"sequences": [ // Required: 2–50 sequences
">seq1\nATGCGATCGATCG",
">seq2\nATGCAATCGATCG"
],
"format": "clustal" // Optional: clustal, fasta, json
}
Response (200):
{
"status": "success",
"alignment": ">seq1\nATGCGATCGATCG\n>seq2\nATGCAATCGATCG",
"stats": {
"sequences": 2,
"length": 16,
"identity_pct": 93.75,
"gap_pct": 0
},
"job_id": "i9j0k1l2"
}
Error Codes
| Code | Meaning | Action |
|---|---|---|
| 400 | Bad Request — missing or invalid parameters | Check request body against endpoint schema |
| 401 | Unauthorized — missing or invalid API key | Verify your API key is valid and included in the header |
| 403 | Forbidden — key lacks scope for this endpoint | Generate a new key with the required scope |
| 404 | Not Found — invalid endpoint URL | Check the endpoint path in the docs |
| 429 | Too Many Requests — rate limit exceeded | Wait for the reset window or upgrade your plan |
| 500 | Internal Server Error | Retry with exponential backoff; contact support if persistent |
Webhook Events
Subscribe to events via the Webhooks page. All payloads are JSON-encoded and signed with your webhook secret.
| Event | Description | Trigger |
|---|---|---|
primer.complete | Primer design job finished | POST /api/v1/primer/design async completion |
blast.complete | BLAST search finished | POST /api/v1/blast/search async completion |
payment.captured | Payment successfully captured | Razorpay webhook → plan activation |
user.created | New user account created | Registration or first Google sign-in |