Skip to content
AIAn Alian Software company

API docs

The endpoints powering this site.

Eight public routes — AI agents, contact, content artifacts. Curl-friendly. No auth required (rate-limited by IP).

These are not commercial APIs. They demonstrate what we ship in engagements. For production access to your own agents, talk to us.

POST/api/solve

Live Problem Solver

Stream a tailored AI scoping response for a one-line business problem. Returns Server-Sent Events with progressive partial-JSON.

Request body

{
  "problem": "We get 800 leads a month and can't follow up fast enough"
}

Example

curl -N -X POST http://localhost:3001/api/solve \
  -H "content-type: application/json" \
  -d '{"problem":"We get 800 leads a month and cant follow up"}'

Notes

  • 10–500 character problem string
  • Streams 'delta' events as Claude generates
  • Final 'done' event with parsed JSON (solution_name, description, timeline, similar_case, pillar)
  • Falls back to friendly 'briefly unavailable' if ANTHROPIC_API_KEY isn't set

Rate limit: 5 requests / IP / hour

POST/api/chat

Site assistant chat

Multi-turn conversational endpoint backing the floating chat widget. Streams Claude responses with a system prompt scoped to Alian AI services, pricing, and case studies.

Request body

{
  "messages": [
    { "role": "user", "content": "What's a typical sprint cost?" }
  ]
}

Example

curl -N -X POST http://localhost:3001/api/chat \
  -H "content-type: application/json" \
  -d '{"messages":[{"role":"user","content":"What is a typical sprint cost?"}]}'

Notes

  • Messages array up to 20 turns
  • Each message: { role: 'user' | 'assistant', content: string ≤ 2000 chars }
  • Returns SSE: 'delta' events for tokens, 'done' or 'error' on close
  • Same fallback as /api/solve when Anthropic is unavailable

Rate limit: 5 requests / IP / hour

POST/api/contact

Contact form submissions

Submit a structured contact / demo / partnership inquiry. Logs to Postgres (when configured) and emails the inbox via Resend (when configured).

Request body

{
  "name": "Jane Doe",
  "email": "jane@company.com",
  "company": "Acme Corp",
  "intent": "discovery",
  "problem": "We need to scope an AI assistant for support tier-1."
}

Example

curl -X POST http://localhost:3001/api/contact \
  -H "content-type: application/json" \
  -d '{"name":"Jane","email":"jane@acme.com","company":"Acme","intent":"discovery","problem":"Scope an AI assistant for support."}'

Notes

  • Validates email format and field lengths
  • Auto-creates contact_submissions Postgres table if DATABASE_URL set
  • Best-effort Resend email to CONTACT_INBOX (defaults sales@aliansoftware.net)

Rate limit: 5 requests / IP / hour

POST/api/subscribe

Newsletter signup

Subscribe an email to the monthly briefing list. Auto-creates the newsletter_subscribers table when DATABASE_URL is set.

Request body

{
  "email": "you@company.com"
}

Example

curl -X POST http://localhost:3001/api/subscribe \
  -H "content-type: application/json" \
  -d '{"email":"you@company.com"}'

Notes

  • Idempotent — duplicate emails return 200 without re-inserting
  • Sends confirmation email to CONTACT_INBOX via Resend

Rate limit: 5 requests / IP / hour

GET/api/checklist

AI Readiness Checklist PDF

Returns the same single-page PDF we use on Strategy engagement day-1. Zero-dependency, brand-styled, 30 questions across 4 sections.

Example

curl http://localhost:3001/api/checklist -o checklist.pdf

Notes

  • Static — caches for an hour client-side, a day at the edge
  • Inline content-disposition by default · client side handles forced download
GET/api/case-study/[slug]

Case-study PDF leave-behind

One-page PDF version of any case study. Pulls from the same data file the /work pages render from.

Example

curl http://localhost:3001/api/case-study/multi-agent-manufacturing -o build.pdf

Notes

  • Slugs: multi-agent-manufacturing, auto-issue-resolution, alian-infinity-erp, lead-qualification-agent, youtube-automation
  • Pre-generated for all 5 case studies at build time
GET/api/og

Dynamic Open Graph image

Generate a brand-styled 1200×630 PNG for arbitrary titles. Useful for social posts, ad creative, or one-off share cards.

Example

curl "http://localhost:3001/api/og?title=Production+AI+in+8+weeks&subtitle=Engineered+in+India" -o og.png

Notes

  • Query params: title (≤160 chars), subtitle (≤240), eyebrow (≤60), badge (≤60)
  • All optional — defaults to the site's primary OG card
GET/api/status

System health probe

Returns operational status of the AI endpoints, Postgres, and Resend. Used by the /status page.

Example

curl http://localhost:3001/api/status

Notes

  • Checks env-var presence as a lightweight proxy for service health
  • Returns JSON: { overall, checks[], generatedAt }

Want endpoints like these in your stack?

This is the pattern we ship — streamed AI routes, scoped rate limits, observability, graceful fallback. Book a call and we'll scope a build.