Base URL: https://siamsmartweb.com
Most endpoints require Authorization: Bearer <your-key>. Generate an API key from your dashboard after signing up.
/api/validateValidate AI-generated code against live docs for your stack.
Request Body
{ "code": "string", "files": { "package.json": "string", ... }, "task": "string", "skill_name": "string", "session_token": "string" }Response
{ "data": { "valid": bool, "issues": [{ "line": num, "column": num, "message": "string", "severity": "error|warning" }], "summary": "string", "checked_libraries": ["string"] }, "usage": { "credits_used": num, "credits_remaining": num } }Example
curl -X POST https://siamsmartweb.com/api/validate \
-H "Authorization: Bearer ca_liv...EY" \
-H "Content-Type: application/json" \
-d '{"code":"<code>","files":{"package.json":"{}"}}'400 (invalid body), 401 (bad auth), 413 (payload >5MB), 429 (rate limit: 60/min)
code must be a non-empty string. files must be an object with string values. files.package.json is used for dependency detection.
/api/detect-stackAnalyze package.json to detect the technology stack.
Request Body
{ "files": { "package.json": "string" } }Response
{ "data": { "libraries": ["Next.js"], "versions": { "next": "16.2.9" }, "frameworks": ["nextjs"], "total_deps": number } }Example
curl -X POST https://siamsmartweb.com/api/detect-stack \
-H "Authorization: Bearer ca_liv...EY" \
-H "Content-Type: application/json" \
-d '{"files":{"package.json":"<content>"}}'400 (invalid body), 401 (bad auth), 413 (payload >100KB)
Only files.package.json is used. Other file keys are ignored.
/api/usageCheck remaining credits, daily usage, and recent API calls.
Response
{ "data": { "credits_remaining": 200, "credits_total": 200, "plan": "free", "used_this_month": 0, "daily_usage": [{ "date": "2026-06-11", "validations": 5, "credits_used": 5 }], "recent": [{ "created_at": "ISO8601", "issues_count": 2, "warnings_count": 1, "valid": true }], "recent_api_calls": [{ "endpoint": "/api/validate", "skill_name": "code-validation", "credits_cost": 1, "created_at": "ISO8601" }] } }Example
curl https://siamsmartweb.com/api/usage -H "Authorization: Bearer ca_liv...
401 (bad auth)
/api/skills/resolveResolve skills with dependency tree, compile prompts, return session token.
Request Body
{ "skills": ["code-validation"], "context": { "project_name": "my-app" } }Response
{ "data": { "name": "code-validation", "resolved_skills": ["code-validation"], "prompt": "string", "session_token": "uuid", "expires_at": "ISO8601", "recommended_skills": [{ "name": "...", "reason": "..." }] } }Example
curl -X POST https://siamsmartweb.com/api/skills/resolve \
-H "Authorization: Bearer ca_liv...EY" \
-H "Content-Type: application/json" \
-d '{"skills":["code-validation"]}'400 (invalid skills/context), 401 (bad auth), 413 (payload >500KB)
Context keys must be alphanumeric with dots/dashes/underscores. Values injected as {{context.key}} in prompts.
/api/docsList all libraries indexed in the docs cache.
Response
{ "data": [{ "library": "Next.js", "version": "16.2.9" }] }Example
curl https://siamsmartweb.com/api/docs
/api/docs/check-staleCheck which indexed libraries have newer versions on npm.
Response
{ "data": [{ "library": "Tailwind CSS", "cached_version": "4.3.0", "npm_latest": "4.4.0", "stale": true, "error": null }] }Example
curl https://siamsmartweb.com/api/docs/check-stale
/api/account/exportExport all account data (GDPR Access / Portability Right).
Response
{ "data": { "account": { "id":"uuid","email":"...","plan":"free","credits_remaining":200,"credits_total":200,"email_confirmed":true,"created_at":"ISO8601" }, "api_keys": [...], "validation_logs": [...], "exported_at": "ISO8601" } }Example
curl -X POST https://siamsmartweb.com/api/account/export \ -H "Authorization: Bearer <sessi...
Returns machine-readable JSON. Use for data portability.
/api/account/deletePermanently delete account and all data (GDPR Deletion Right).
Response
{ "data": { "deleted": true } }Example
curl -X POST https://siamsmartweb.com/api/account/delete \ -H "Authorization: Bearer <sessi...
Irreversible. Deletes auth user, API keys, validation logs, users row.
/api/account/updateUpdate account profile (GDPR Correction Right).
Request Body
{ "name": "New Name" }Response
{ "data": { "updated": true, "fields": ["name"] } }Example
curl -X POST https://siamsmartweb.com/api/account/update \
-H "Authorization: Bearer *** \
-H "Content-Type: application/json" \
-d '{"name":"New Name"}'400 (no valid fields), 401 (bad auth)
Questions? info@siamsmartweb.com