{"openapi":"3.1.0","info":{"title":"Akshat Goel — Portfolio API","version":"1.0.0","summary":"JSON and Markdown representations of akshatgoel.com, for agents and other programmatic clients.","description":"Machine-readable surface of https://www.akshatgoel.com.\n\nThree things are worth knowing before you call anything:\n\n- **Errors are always JSON.** Every failure under `/api` returns an object with a stable `code`, a human `message`, and a `hint` describing how to fix the request. No endpoint returns an HTML error page.\n- **Every page has a Markdown twin.** Send `Accept: text/markdown` to any page URL and you get `text/markdown; charset=utf-8` back, with `Vary: Accept`. The same document is addressable directly under `/md`.\n- **Unknown paths return 404**, with a short Markdown body listing the sitemap, `llms.txt`, and this specification.\n\nStart at https://www.akshatgoel.com/llms.txt for a map of the site, or https://www.akshatgoel.com/developers for an index of these resources.","contact":{"name":"Akshat Goel","url":"https://www.akshatgoel.com/developers","email":"akshathg7@gmail.com"},"license":{"name":"MIT","url":"https://github.com/akshatgoel07/new-portfolio/blob/main/LICENSE.md"}},"servers":[{"url":"https://www.akshatgoel.com","description":"Production"}],"security":[{}],"externalDocs":{"description":"Developer resources","url":"https://www.akshatgoel.com/developers"},"tags":[{"name":"Discovery","description":"Documents that describe the site."},{"name":"Content","description":"Profile, projects, and notebook posts."},{"name":"Printer","description":"Live telemetry from a Bambu Lab A1 Mini. Reads are public; writes require a bearer token."}],"paths":{"/openapi.json":{"get":{"tags":["Discovery"],"operationId":"getOpenApiDocument","summary":"This specification","responses":{"200":{"description":"The OpenAPI document.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/llms.txt":{"get":{"tags":["Discovery"],"operationId":"getLlmsTxt","summary":"Concise site map for language models","responses":{"200":{"description":"Markdown map of the site.","content":{"text/markdown":{"schema":{"type":"string"}}}}}}},"/llms-full.txt":{"get":{"tags":["Discovery"],"operationId":"getLlmsFullTxt","summary":"Full text of the profile and every notebook post","responses":{"200":{"description":"Extended Markdown knowledge file.","content":{"text/markdown":{"schema":{"type":"string"}}}}}}},"/md/{path}":{"get":{"tags":["Content"],"operationId":"getMarkdown","summary":"Markdown twin of any page","description":"Mirrors the site tree: `/notes/agent-evals` is also `/md/notes/agent-evals`. Requesting the original page URL with `Accept: text/markdown` returns this same document.","parameters":[{"name":"path","in":"path","required":true,"description":"Site path without the leading slash.","schema":{"type":"string"},"examples":{"note":{"value":"notes/agent-evals"},"project":{"value":"projects/seat-layout-builder"},"index":{"value":"projects"}}}],"responses":{"200":{"description":"Markdown document.","headers":{"Vary":{"description":"Always includes `Accept`.","schema":{"type":"string"}}},"content":{"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"No page at this path. The body is a short Markdown document linking to the sitemap, llms.txt, and this specification.","content":{"text/markdown":{"schema":{"type":"string"}}}}}}},"/api/profile":{"get":{"tags":["Content"],"operationId":"getProfile","summary":"Structured identity","responses":{"200":{"description":"Profile document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}}}}},"/api/projects":{"get":{"tags":["Content"],"operationId":"listProjects","summary":"Every project and notebook post","responses":{"200":{"description":"Projects and notes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectsResponse"}}}}}}},"/api/printer/state":{"get":{"tags":["Printer"],"operationId":"getPrinterState","summary":"Latest telemetry, verdict, and frame metadata","parameters":[{"name":"device","in":"query","required":false,"description":"Printer device id. Defaults to the site's own device when omitted.","schema":{"type":"string"}}],"responses":{"200":{"description":"Current printer state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrinterState"}}}},"400":{"description":"`device` was not supplied and no default is configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No device with that id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/printer/history":{"get":{"tags":["Printer"],"operationId":"getPrinterHistory","summary":"Telemetry and verdicts over a time range","parameters":[{"name":"device","in":"query","required":false,"description":"Printer device id. Defaults to the site's own device when omitted.","schema":{"type":"string"}},{"name":"range","in":"query","required":false,"description":"Look-back window. Unknown values fall back to `1h`.","schema":{"type":"string","enum":["15m","1h","6h","24h"],"default":"1h"}}],"responses":{"200":{"description":"Time series.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrinterHistory"}}}},"400":{"description":"`device` was not supplied and no default is configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/printer/frame":{"get":{"tags":["Printer"],"operationId":"getPrinterFrame","summary":"Latest camera frame as JPEG","parameters":[{"name":"device","in":"query","required":false,"description":"Printer device id. Defaults to the site's own device when omitted.","schema":{"type":"string"}},{"name":"slot","in":"query","required":false,"description":"Ring-buffer slot, 0-9. Omit for the newest frame.","schema":{"type":"integer","minimum":0,"maximum":9}}],"responses":{"200":{"description":"JPEG image.","headers":{"X-Captured-At":{"description":"Capture time, ISO 8601.","schema":{"type":"string","format":"date-time"}}},"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Missing device, or `slot` outside 0-9.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No frame stored for this device or slot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Printer"],"operationId":"uploadPrinterFrame","summary":"Upload a camera frame","description":"Raw JPEG bytes in the body; metadata in headers. Writes into a 10-slot ring buffer.","security":[{"bearerAuth":[]}],"parameters":[{"name":"x-device-id","in":"header","required":true,"schema":{"type":"string"}},{"name":"x-slot","in":"header","required":true,"description":"Ring-buffer slot, 0-9.","schema":{"type":"integer","minimum":0,"maximum":9}},{"name":"x-captured-at","in":"header","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"x-width","in":"header","required":false,"schema":{"type":"integer"}},{"name":"x-height","in":"header","required":false,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Frame stored.","content":{"application/json":{"schema":{"type":"object","required":["ok","slot","bytes"],"properties":{"ok":{"type":"boolean","const":true},"slot":{"type":"integer"},"bytes":{"type":"integer"}}}}}},"400":{"description":"Missing headers, wrong content type, bad slot, or an empty body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or wrong bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Frame larger than 4 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The frame could not be stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/printer/telemetry":{"post":{"tags":["Printer"],"operationId":"ingestPrinterTelemetry","summary":"Ingest a batch of telemetry rows and verdicts","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryIngest"}}}},"responses":{"200":{"description":"Batch written.","content":{"application/json":{"schema":{"type":"object","required":["ok","inserted"],"properties":{"ok":{"type":"boolean","const":true},"inserted":{"type":"object","properties":{"telemetry":{"type":"integer"},"verdicts":{"type":"integer"}}}}}}}},"400":{"description":"Invalid JSON, missing `device_id`, or an empty batch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or wrong bearer token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The batch could not be written.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Ingest token for the printer agent. Read endpoints need no authentication."}},"schemas":{"Error":{"type":"object","description":"Every failure under /api uses this shape. `code` is stable and safe to branch on; `error` is the legacy short string and is kept for backwards compatibility.","required":["error","code","message","hint","status","docs"],"properties":{"error":{"type":"string","description":"Short legacy message.","examples":["device required"]},"code":{"type":"string","description":"Stable machine-readable error code.","enum":["device_required","unknown_device","unauthorized","missing_headers","unsupported_media_type","invalid_slot","empty_body","payload_too_large","invalid_json","empty_batch","not_found","method_not_allowed","internal_error"]},"message":{"type":"string","description":"Human-readable explanation."},"hint":{"type":"string","description":"How to fix the request."},"status":{"type":"integer","description":"HTTP status code."},"docs":{"type":"string","format":"uri","description":"URL of this specification."}}},"Profile":{"type":"object","required":["name","role","tagline","bio","links"],"properties":{"name":{"type":"string"},"role":{"type":"string"},"age":{"type":"integer"},"tagline":{"type":"string"},"bio":{"type":"array","items":{"type":"string"}},"email":{"type":"string","format":"email"},"sameAs":{"type":"array","items":{"type":"string","format":"uri"}},"links":{"type":"object","additionalProperties":{"type":"string","format":"uri"}},"counts":{"type":"object","properties":{"projects":{"type":"integer"},"notes":{"type":"integer"}}}}},"Project":{"type":"object","required":["slug","name","year","category","summary","markdown"],"properties":{"slug":{"type":"string","enum":["seat-layout-builder","bnngpt","printer","spring-animation","buzz","tech-kareer","animation-showcase","measurability"]},"name":{"type":"string"},"year":{"type":"string"},"category":{"type":"string","enum":["engineering","design","personal"]},"summary":{"type":"string"},"tech":{"type":"array","items":{"type":"string"}},"url":{"type":["string","null"],"format":"uri"},"markdown":{"type":"string","format":"uri","description":"URL of the Markdown representation."}}},"Note":{"type":"object","required":["slug","title","date","summary","page","markdown"],"properties":{"slug":{"type":"string","enum":["half-marathon-training","paper-podcast","agent-evals","netflix-artwork","multi-arm-bandit","seat-layout-builder","spring-animation"]},"title":{"type":"string"},"date":{"type":"string"},"summary":{"type":"string"},"page":{"type":"string","format":"uri"},"markdown":{"type":"string","format":"uri"}}},"ProjectsResponse":{"type":"object","required":["projects","notes"],"properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"notes":{"type":"array","items":{"$ref":"#/components/schemas/Note"}}}},"PrinterTelemetry":{"type":"object","properties":{"captured_at":{"type":"string","format":"date-time"},"state":{"type":["string","null"]},"progress":{"type":["number","null"]},"current_file":{"type":["string","null"]},"nozzle_temp":{"type":["number","null"]},"bed_temp":{"type":["number","null"]},"chamber_temp":{"type":["number","null"]},"layer_num":{"type":["integer","null"]},"total_layers":{"type":["integer","null"]},"print_speed":{"type":["number","null"]},"light_on":{"type":["boolean","null"]},"wifi_signal":{"type":["string","number","null"]}}},"PrinterVerdict":{"type":"object","properties":{"captured_at":{"type":"string","format":"date-time"},"verdict":{"type":["string","null"]},"confidence":{"type":["number","null"]},"reason":{"type":["string","null"]}}},"PrinterState":{"type":"object","required":["device","telemetry","verdict","frame"],"properties":{"device":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"last_seen_at":{"type":["string","null"],"format":"date-time"}}},"telemetry":{"oneOf":[{"$ref":"#/components/schemas/PrinterTelemetry"},{"type":"null"}]},"verdict":{"oneOf":[{"$ref":"#/components/schemas/PrinterVerdict"},{"type":"null"}]},"frame":{"oneOf":[{"type":"object","properties":{"captured_at":{"type":"string","format":"date-time"},"width":{"type":["integer","null"]},"height":{"type":["integer","null"]}}},{"type":"null"}]}}},"PrinterHistory":{"type":"object","required":["range","telemetry","verdicts"],"properties":{"range":{"type":"string","enum":["15m","1h","6h","24h"]},"telemetry":{"type":"array","items":{"$ref":"#/components/schemas/PrinterTelemetry"}},"verdicts":{"type":"array","items":{"$ref":"#/components/schemas/PrinterVerdict"}}}},"TelemetryIngest":{"type":"object","required":["device_id"],"properties":{"device_id":{"type":"string"},"telemetry":{"type":"array","items":{"$ref":"#/components/schemas/PrinterTelemetry"}},"verdicts":{"type":"array","items":{"$ref":"#/components/schemas/PrinterVerdict"}}}}}}}