API Reference

← Home

Base URL: https://clishai-api-staging.srv1808375.hstgr.cloud

Authentication

Protected endpoints accept either a NextAuth.js session JWT or a Pro API key. Send one of:

Authorization: Bearer <nextauth-jwt>
# or
X-API-Key: clishai_<your-api-key>

Get your API key on the Dashboard → API Keys page (Pro plan required).

Try it live

POST/api/analyzeTry it

Endpoints

POST/api/analyze

Analyse a startup idea or URL for market saturation and originality. Returns a score, competitor list, and AI-generated insights.

Auth: Optional — JWT Bearer or X-API-Key (required for quota tracking)

Request

{
  "url": "https://example.com",   // or
  "description": "A SaaS tool for..."
}

Response

{
  "id": "uuid",
  "input_url": "https://example.com",
  "input_text": null,
  "score": { "score": 74, "band": "Moderate", "originality": 0.74, "saturation": 0.26 },
  "competitors": [{ "name": "Acme", "url": "https://acme.com", "similarity_score": 0.82 }],
  "insights": ["Strong differentiation in ...", "Watch out for ..."],
  "created_at": "2026-05-08T10:00:00Z"
}
curl -X POST https://clishai-api-staging.srv1808375.hstgr.cloud/api/analyze \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your-jwt>" \
  -d '{"url": "https://example.com"}'
GET/api/analysis/{id}

Fetch a previously run analysis by its ID.

Auth: None — public

Response

{ "id": "uuid", "score": {...}, "competitors": [...], "insights": [...], ... }
curl https://clishai-api-staging.srv1808375.hstgr.cloud/api/analysis/<id>
GET/api/analysis/{id}/map

Returns 2-D UMAP coordinates for the input idea and its competitors, suitable for scatter-plot visualisation.

Auth: None — public

Response

{
  "points": [
    { "name": "Your Idea", "x": 0.12, "y": -0.34, "similarity": 1.0, "is_input": true },
    { "name": "Acme", "x": 0.15, "y": -0.30, "similarity": 0.82, "is_input": false }
  ]
}
curl https://clishai-api-staging.srv1808375.hstgr.cloud/api/analysis/<id>/map
GET/api/analysis/{id}/clusters

Returns AI-clustered competitor groups and identified market gaps for the analysis.

Auth: None — public

Response

{
  "clusters": [
    { "label": "AI Writing Tools", "size": 12, "centroid_keywords": ["gpt","writing","content"], "is_input_cluster": true }
  ],
  "gaps": ["No tool targets legal copywriting specifically"]
}
curl https://clishai-api-staging.srv1808375.hstgr.cloud/api/analysis/<id>/clusters
POST/api/visual/compare

Compare two product screenshots or logos using CLIP embeddings. Returns a visual similarity score.

Auth: Pro plan required — JWT Bearer or X-API-Key

Request

multipart/form-data
  image_a: <file>   // JPEG, PNG, WebP, or GIF — max 10 MB
  image_b: <file>

Response

{ "similarity": 0.73, "label": "High" }
curl -X POST https://clishai-api-staging.srv1808375.hstgr.cloud/api/visual/compare \
  -H "Authorization: Bearer <your-jwt>" \
  -F "image_a=@screenshot1.png" \
  -F "image_b=@screenshot2.png"
GET/api/adcopy

Fetch and analyse Google Ads copy for a competitor domain. Returns ad headlines, themes, and an AI angle summary.

Auth: Pro plan required — JWT Bearer or X-API-Key

Request

Query param: ?url=https://competitor.com

Response

{
  "domain": "competitor.com",
  "ads": [{ "headline": "...", "description": "..." }],
  "themes": ["Price comparison", "Free trial CTA"],
  "analysis": "Competitor focuses on..."
}
curl "https://clishai-api-staging.srv1808375.hstgr.cloud/api/adcopy?url=https://competitor.com" \
  -H "Authorization: Bearer <your-jwt>"
GET/api/usage

Returns the authenticated user's current plan, monthly analysis count, limit, and reset date.

Auth: Required — JWT Bearer or X-API-Key

Response

{
  "plan": "pro",
  "analyses_this_month": 14,
  "limit": null,
  "resets_at": "2026-06-01"
}
curl https://clishai-api-staging.srv1808375.hstgr.cloud/api/usage \
  -H "Authorization: Bearer <your-jwt>"

Rate limits

Free plan — 5 analyses / month. API access not available.

Pro plan — Unlimited analyses, full API access.

View pricing →