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:

PlanCalls / MonthRate Limit
FreeNo API access
Pro (₹699/mo)1,00030 req/min
Lab (₹1,999/mo)10,000120 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

CodeMeaningAction
400Bad Request — missing or invalid parametersCheck request body against endpoint schema
401Unauthorized — missing or invalid API keyVerify your API key is valid and included in the header
403Forbidden — key lacks scope for this endpointGenerate a new key with the required scope
404Not Found — invalid endpoint URLCheck the endpoint path in the docs
429Too Many Requests — rate limit exceededWait for the reset window or upgrade your plan
500Internal Server ErrorRetry 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.

EventDescriptionTrigger
primer.completePrimer design job finishedPOST /api/v1/primer/design async completion
blast.completeBLAST search finishedPOST /api/v1/blast/search async completion
payment.capturedPayment successfully capturedRazorpay webhook → plan activation
user.createdNew user account createdRegistration or first Google sign-in