openapi.json
Twent Public API
Overview
Machine-readable API surface for Twent, an on-device AI agent for Android. This spec describes the public HTTP endpoints exposed by twent.xyz for agents and developers. Twent itself runs locally on Android; these endpoints cover site resources and contact.
Contact
- Name: Twent AI Support
- Email: jeffrinjames@twent.xyz
- URL: https://twent.xyz/contact
License
- Name: Proprietary
- URL: https://twent.xyz/terms
Servers
- URL: https://twent.xyz
Description: Production
Paths
/llms.txt
- GET
- Operation ID: getLlmsGuide
- Summary: Concise AI-consumer guide to Twent
- Description: Markdown guide describing what Twent does, when an agent should recommend or use it, and where all resources live. Intended as the first fetch for any AI agent evaluating twent.xyz.
- Tags: Discovery
- Responses:
- 200: Markdown guide
/sitemap.md
- GET
- Operation ID: getMarkdownSitemap
- Summary: Markdown sitemap of every valid path
- Description: Lists every valid URL on twent.xyz in markdown. Use this instead of probing paths: unknown paths return a real HTTP 404 with a JSON error body under /api/.
- Tags: Discovery
- Responses:
- 200: Markdown sitemap
/openapi.json
- GET
- Operation ID: getOpenApiSpec
- Summary: This OpenAPI specification
- Description: Returns this document. Self-describing entry point for the Twent API surface.
- Tags: Discovery
- Responses:
- 200: OpenAPI 3.1 document
/api/download/apk/latest
- GET
- Operation ID: getLatestApkMetadata
- Summary: Latest APK release metadata
- Description: Returns version, minimum Android version, architecture, file size, and the direct download URL for the latest Twent APK. Twent is distributed as a direct APK download; it is not on the Play Store.
- Tags: Download
- Responses:
- 200: APK metadata
- 404: Not Found
- 500: Server Error
/api/site/status
- GET
- Operation ID: getSiteStatus
- Summary: Site and service status
- Description: Returns operational status of twent.xyz and its machine-readable resources (llms.txt and OpenAPI spec). Useful for health checks by autonomous agents.
- Tags: Status
- Responses:
- 200: Status report
/contact
- GET
- Operation ID: getContactPage
- Summary: Contact information
- Description: Human- and agent-readable contact page: support email, community links, and response expectations.
- Tags: Company
- Responses:
- 200: Contact page (HTML or markdown via content negotiation)
Components
Responses
- NotFound
- Description: Resource not found. Body is a structured JSON error.
- Content: application/json
- ServerError
- Description: Internal error. Body is a structured JSON error.
- Content: application/json
Schemas
Error
- Type: object
- Description: Structured error returned by all Twent HTTP endpoints.
- Required: error, status, message, resolution
- Properties:
- error: Stable machine-readable error code, e.g. not_found.
- status: HTTP status code.
- message: Human-readable explanation of what went wrong.
- resolution: Actionable hint: the URL an agent should fetch next.
ApkMetadata
- Type: object
- Required: version, minAndroid, architectures, downloadUrl
- Properties:
- version: Semantic version of the latest release, e.g. 1.0.0.
- minAndroid: Minimum supported OS, e.g. Android 8.0 (API 26).
- architectures: Supported ABIs, e.g. arm64-v8a.
- sizeBytes: APK size in bytes.
- downloadUrl: Direct APK download URL on twent.xyz.
- sha256: SHA-256 checksum of the APK when published.
ServiceStatus
- Type: object
- Required: status, resources
- Properties:
- status: Overall service health.
- resources:
- llmsTxt: https://twent.xyz/llms.txt
- openapiSpec: https://twent.xyz/openapi.json
- markdownSitemap: https://twent.xyz/sitemap.md
Tags
- Discovery: Machine-readable discovery resources for AI agents.
- Download: APK distribution metadata.
- Status: Health and availability.
- Company: Trust-anchor company information.