Reference
Programmatic access
The analysis endpoints can be called directly from a script — translation, alignment, digests, enzyme search and primer checks over HTTP.
Base URL
https://api.gene-loop.comTwo endpoints need no authentication and are useful for checking the service is up:
curl https://api.gene-loop.com/health
# {"status":"healthy","version":"0.2.0"}Authentication
Everything else takes a bearer token. Request one — no credentials needed — and send it on subsequent calls.
TOKEN=$(curl -s -X POST https://api.gene-loop.com/auth/guest-token \
-H 'Content-Type: application/json' -d '{}' \
| python3 -c 'import sys,json; print(json.load(sys.stdin)["token"])')
curl -s https://api.gene-loop.com/auth/me -H "Authorization: Bearer $TOKEN"The response carries the token, an identifier and an expiry. Tokens last about 24 hours; request a new one rather than trying to refresh.
The endpoints worth using
These are stable, fully specified, and the ones this page documents. All take POST with a JSON body and a bearer token.
| Endpoint | Does |
|---|---|
/sequence/translate | Finds open reading frames and translates them. |
/sequence/analyze | Properties of a selected region. |
/alignment/align | Pairwise alignment of two sequences. |
/digest/simulate | Restriction digest; returns the fragments. |
/enzymes/search | Finds enzymes matching cutting criteria. |
/enzymes/analyze | Full restriction analysis of a sequence. |
/enzymes/list | Lists enzymes by category. |
/primer/design | Designs primers. |
/primer/validate | Checks a primer pair. |
/pcr/simulate | Simulates amplification. |
/blast/search | Similarity search. |
/cloning/plan-restriction | Plans a restriction cloning strategy. |
Worked examples
Translate and find ORFs
curl -s -X POST https://api.gene-loop.com/sequence/translate \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"sequence": "ATGGCTAGCAAAGGTGAAGAACTGTTTACCGGTTAA",
"circular": false,
"min_orf_length": 30,
"include_reading_frames": true
}'Simulate a digest
The sequence goes inside a sequence_data object. Set circular honestly — it changes the fragment count.
curl -s -X POST https://api.gene-loop.com/digest/simulate \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"sequence_data": {
"sequence": "GAATTCAAAGGATCCTTTAAGCTTGGGAAACCC",
"name": "test construct",
"circular": false
},
"enzymes": ["EcoRI", "BamHI"]
}'Returns a fragments array, each with start, end, length, the enzymes that produced it and a molecular weight.
Align two sequences
curl -s -X POST https://api.gene-loop.com/alignment/align \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"sequence1": "ATGGCTAGCAAAGGT",
"sequence2": "ATGGCTTGCAAAGGT",
"name1": "reference",
"name2": "clone 3"
}'Returns identity, score, matches, gaps, the two aligned strings, a match line and a preformatted alignment you can print. Scoring defaults to match 2.0, mismatch -1.0, gap open -2.0, gap extend -1.0, algorithm global — all overridable.
Find single cutters
Enzyme search takes criteria, not an enzyme name — you are asking “what cuts this the way I need?”
curl -s -X POST https://api.gene-loop.com/enzymes/search \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"sequence_data": { "sequence": "...", "circular": true },
"criteria": {
"cut_frequency": "single",
"overhangs": "any"
}
}'Errors
| Status | Means | Do |
|---|---|---|
| 401 | The token was rejected or has expired. | Request a new one. |
| 422 | The request body did not validate. | Read the response — it names the missing or wrong field by path. |
| 429 | You are over your daily request limit. | Back off and honour Retry-After. Usage limits. |
| 503 | The service cannot verify credentials right now. | This one is ours, not yours. Retry after the interval given. |
Validation errors name the exact field:
{
"error": {
"code": "validation_error",
"message": "Request validation error",
"details": [
{ "type": "missing", "loc": ["body", "criteria"], "msg": "Field required" }
]
},
"request_id": "6354c919-83e9-4941-a5bd-43b322500e91"
}Quote the request_id if you need to ask us about a specific failure.
Things worth knowing
- Rate limits are per day
- 50 free, 500 Pro, 2,000 Team — and a rejected request still counts, so back off rather than retrying in a loop. Usage limits.
- Circularity is yours to declare
- Nothing infers it. Get it wrong and your digest fragments — and any coordinate crossing the origin — are wrong.
- This is not the assistant
- These endpoints are deterministic analysis and nothing else. Projects, files, the assistant and verification are not part of this interface.
- No self-hosting
- There is no supported way to run the backend yourself today.