{"openapi":"3.1.0","info":{"title":"TianSphere API","version":"1.0.0","summary":"Read-only data about TianSphere, an AI engineering consultancy in Hong Kong.","description":"Public JSON API for the TianSphere website: services, case studies, field notes and contact details. No authentication. Errors use RFC 9457 problem details (application/problem+json) with a stable `code` and a `hint`. The same data is available as MCP tools at https://tiansphere.com/mcp.","contact":{"name":"TianSphere","email":"info@tiansphere.com","url":"https://tiansphere.com/contact"}},"externalDocs":{"description":"TianSphere API docs","url":"https://tiansphere.com/developers/api"},"servers":[{"url":"https://tiansphere.com"}],"security":[],"tags":[{"name":"Services","description":"What we offer."},{"name":"Proof","description":"Case studies and field notes."},{"name":"Contact","description":"How to start a project."}],"paths":{"/api/services":{"get":{"operationId":"listServices","tags":["Services"],"summary":"List services","description":"List every AI engineering service TianSphere offers, with a one-line summary and page URL. Call this first to see what TianSphere does.","responses":{"200":{"description":"All services.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ServiceSummary"}}}}},"405":{"description":"The method is not GET or HEAD (code method_not_allowed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"Any other error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/services/{slug}":{"get":{"operationId":"getService","tags":["Services"],"summary":"Get a service","description":"Get one service in full: the problem it solves, four delivery steps, a proof point with its method, and FAQs.","parameters":[{"name":"slug","in":"path","required":true,"description":"Service slug from listServices.","schema":{"$ref":"#/components/schemas/ServiceSlug"}}],"responses":{"200":{"description":"The service.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceDetail"}}}},"404":{"description":"No service has this slug (code unknown_service).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"The method is not GET or HEAD (code method_not_allowed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"Any other error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/case-studies":{"get":{"operationId":"listCaseStudies","tags":["Proof"],"summary":"List case studies","description":"List case studies with the measured result and the method behind each number. Filter by service to find proof for one kind of project.","parameters":[{"name":"service","in":"query","required":false,"description":"Return only items for this service.","schema":{"$ref":"#/components/schemas/ServiceSlug"}}],"responses":{"200":{"description":"Matching case studies.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CaseStudy"}}}}},"400":{"description":"The service filter is not a valid slug (code invalid_parameter).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"The method is not GET or HEAD (code method_not_allowed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"Any other error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/notes":{"get":{"operationId":"listNotes","tags":["Proof"],"summary":"List field notes","description":"List published field notes (technical articles on evals, LLM cost, AI integration and MCP), newest first, with URL and summary.","parameters":[{"name":"service","in":"query","required":false,"description":"Return only items for this service.","schema":{"$ref":"#/components/schemas/ServiceSlug"}}],"responses":{"200":{"description":"Matching notes, newest first.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Note"}}}}},"400":{"description":"The service filter is not a valid slug (code invalid_parameter).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"405":{"description":"The method is not GET or HEAD (code method_not_allowed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"Any other error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/contact-details":{"get":{"operationId":"getContactDetails","tags":["Contact"],"summary":"Get contact details","description":"Get how to start a project with TianSphere: email, contact page, reply time and what to include. Use this when a user wants to hire TianSphere.","responses":{"200":{"description":"Contact details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactDetails"}}}},"405":{"description":"The method is not GET or HEAD (code method_not_allowed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"Any other error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/api/contact":{"post":{"operationId":"sendContactMessage","tags":["Contact"],"summary":"Send a contact message (browser only)","description":"Send a message from the website contact form. It needs a Cloudflare Turnstile token that only the browser widget can create, so agents cannot call it. Agents should give the user the email address from getContactDetails instead.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}}},"responses":{"200":{"description":"Message sent (JSON requests).","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["ok"],"properties":{"ok":{"type":"boolean","const":true}}}}}},"303":{"description":"Form requests are redirected to /contact?sent=1 or /contact?error=1."},"400":{"description":"Invalid fields (code validation_failed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ContactValidationProblem"}}}},"403":{"description":"Missing or failed Turnstile check (code spam_check_failed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ContactErrorProblem"}}}},"502":{"description":"The email provider failed (code delivery_failed).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ContactErrorProblem"}}}}}}}},"components":{"schemas":{"ServiceSlug":{"type":"string","description":"Service identifier.","enum":["ai-integration","ai-evals","llm-cost","mcp"]},"ServiceSummary":{"type":"object","additionalProperties":false,"required":["slug","title","summary","url"],"properties":{"slug":{"$ref":"#/components/schemas/ServiceSlug"},"title":{"type":"string","description":"Service name."},"summary":{"type":"string","description":"One-line summary."},"url":{"type":"string","description":"Service page.","format":"uri"}}},"ServiceDetail":{"type":"object","additionalProperties":false,"required":["slug","title","promise","url","problem","steps","proof","faqs"],"properties":{"slug":{"$ref":"#/components/schemas/ServiceSlug"},"title":{"type":"string","description":"Service name."},"promise":{"type":"string","description":"What the client gets."},"url":{"type":"string","description":"Service page.","format":"uri"},"problem":{"type":"array","description":"The problem this service solves, as paragraphs.","items":{"type":"string"}},"steps":{"type":"array","description":"Delivery steps, in order.","items":{"type":"object","additionalProperties":false,"required":["title","body"],"properties":{"title":{"type":"string","description":"Step name."},"body":{"type":"string","description":"What happens in this step."}}}},"proof":{"type":"object","additionalProperties":false,"required":["value","label","method"],"properties":{"value":{"type":"string","description":"Headline number."},"label":{"type":"string","description":"What the number measures."},"method":{"type":"string","description":"How it was measured."}}},"faqs":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["question","answer"],"properties":{"question":{"type":"string","description":"Question."},"answer":{"type":"string","description":"Answer."}}}}}},"CaseStudy":{"type":"object","additionalProperties":false,"required":["client","result","summary","method","service","url"],"properties":{"client":{"type":"string","description":"Client or product, with a short descriptor."},"result":{"type":"string","description":"Measured result."},"summary":{"type":"string","description":"What was done."},"method":{"type":"string","description":"How the result was measured."},"service":{"type":["string","null"],"enum":["ai-integration","ai-evals","llm-cost","mcp",null],"description":"Related service slug, or null."},"url":{"type":"string","description":"Product site or the work page.","format":"uri"}}},"Note":{"type":"object","additionalProperties":false,"required":["title","summary","published","service","url"],"properties":{"title":{"type":"string","description":"Article title."},"summary":{"type":"string","description":"Article summary."},"published":{"type":"string","description":"Publication date.","format":"date"},"service":{"$ref":"#/components/schemas/ServiceSlug"},"url":{"type":"string","description":"Article URL.","format":"uri"}}},"ContactDetails":{"type":"object","additionalProperties":false,"required":["email","contactPage","replyTime","firstStep","location","include"],"properties":{"email":{"type":"string","description":"Email address for new projects.","format":"email"},"contactPage":{"type":"string","description":"Contact form page.","format":"uri"},"replyTime":{"type":"string","description":"Typical reply time."},"firstStep":{"type":"string","description":"First step of an engagement."},"location":{"type":"string","description":"Where the company is based."},"include":{"type":"string","description":"What to put in a first message."}}},"ContactRequest":{"type":"object","additionalProperties":false,"required":["name","email","message","turnstileToken"],"properties":{"name":{"type":"string","description":"Sender name.","minLength":1,"maxLength":200},"email":{"type":"string","description":"Sender work email.","format":"email","maxLength":320},"company":{"type":"string","description":"Company name.","maxLength":200},"message":{"type":"string","description":"Message.","minLength":20,"maxLength":4000},"source":{"type":"string","description":"Page the message was sent from.","maxLength":300},"website":{"type":"string","description":"Spam trap. Must be empty."},"turnstileToken":{"type":"string","description":"Cloudflare Turnstile token from the browser widget."}}},"Problem":{"type":"object","additionalProperties":false,"required":["type","title","status","detail","code","hint"],"properties":{"type":{"type":"string","description":"URI of the problem type. It opens the matching entry in the API docs.","format":"uri"},"title":{"type":"string","description":"Short summary of the problem type."},"status":{"type":"integer","description":"HTTP status code."},"detail":{"type":"string","description":"What went wrong with this request."},"code":{"type":"string","description":"Stable, machine-readable error code.","enum":["not_found","unknown_service","invalid_parameter","method_not_allowed","validation_failed","spam_check_failed","rate_limited","delivery_failed","not_configured"]},"hint":{"type":"string","description":"How to fix the request."}},"description":"RFC 9457 problem details."},"ContactValidationProblem":{"type":"object","additionalProperties":false,"required":["type","title","status","detail","code","hint","ok","fieldErrors"],"properties":{"type":{"type":"string","description":"URI of the problem type. It opens the matching entry in the API docs.","format":"uri"},"title":{"type":"string","description":"Short summary of the problem type."},"status":{"type":"integer","description":"HTTP status code."},"detail":{"type":"string","description":"What went wrong with this request."},"code":{"type":"string","description":"Stable, machine-readable error code.","enum":["not_found","unknown_service","invalid_parameter","method_not_allowed","validation_failed","spam_check_failed","rate_limited","delivery_failed","not_configured"]},"hint":{"type":"string","description":"How to fix the request."},"ok":{"type":"boolean","const":false},"fieldErrors":{"type":"object","description":"Error messages by field name.","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"ContactErrorProblem":{"type":"object","additionalProperties":false,"required":["type","title","status","detail","code","hint","ok","error"],"properties":{"type":{"type":"string","description":"URI of the problem type. It opens the matching entry in the API docs.","format":"uri"},"title":{"type":"string","description":"Short summary of the problem type."},"status":{"type":"integer","description":"HTTP status code."},"detail":{"type":"string","description":"What went wrong with this request."},"code":{"type":"string","description":"Stable, machine-readable error code.","enum":["not_found","unknown_service","invalid_parameter","method_not_allowed","validation_failed","spam_check_failed","rate_limited","delivery_failed","not_configured"]},"hint":{"type":"string","description":"How to fix the request."},"ok":{"type":"boolean","const":false},"error":{"type":"string","description":"Message for the website form."}}}}}}