{"openapi":"3.0.0","info":{"title":"Glass Health API","description":"Development documentation","version":"1.0.0"},"tags":[{"name":"Messages","description":"Message generation endpoints"},{"name":"Scribing","description":"Audio transcription and clinical note generation"},{"name":"Uploads","description":"File uploads for large Scribe jobs and for Messages attachments (fileUploadIds, Glass 5.5)"},{"name":"Deprecated","description":"Deprecated endpoints — will be removed in a future release"}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-Api-Key"}},"schemas":{}},"security":[{"apiKey":[]}],"servers":[{"url":"https://glass.health/api/external"}],"paths":{"/v2/messages":{"post":{"responses":{"200":{"description":"Successful response body","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"metadata":{"type":"object","properties":{},"required":[],"additionalProperties":{"oneOf":[{"type":"string","nullable":true},{"type":"number","nullable":true},{"type":"boolean","nullable":true}]}},"role":{"type":"string","enum":["assistant"]},"text":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"number"},"outputTokens":{"type":"number"}},"required":["inputTokens","outputTokens"],"additionalProperties":false},"references":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["literature"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string","deprecated":true},"journal_title":{"type":"string","deprecated":true},"year":{"type":"number"},"pub_date":{"type":"string","nullable":true},"doi":{"type":"string","nullable":true},"authors":{"type":"string","nullable":true,"deprecated":true},"types":{"type":"array","items":{"type":"string"}},"is_high_impact_journal":{"type":"boolean"},"is_highly_cited_article":{"type":"boolean"},"is_recently_published":{"type":"boolean"},"pmid":{"type":"number","nullable":true},"authors_structured":{"type":"array","items":{"type":"object","properties":{"first_name":{"type":"string","nullable":true},"last_name":{"type":"string"},"initials":{"type":"string","nullable":true}},"required":["last_name"],"additionalProperties":false}},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"authors":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","authors","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true}},"required":["index","type","id","doc_id","url","title","journal_title","year","pub_date","doi","authors","types","authors_structured","display","locator"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["compound"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"generic_name":{"type":"string"},"manufactured_name":{"type":"string"},"effective_time":{"type":"string"},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true}},"required":["index","type","id","doc_id","url","generic_name","manufactured_name","effective_time","display","locator"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["billing_code"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"code":{"type":"string"},"code_system":{"type":"string","enum":["icd-10-cm","hcpcs"]},"description":{"type":"string"},"is_billable":{"type":"boolean"},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true}},"required":["index","type","id","doc_id","url","code","code_system","description","is_billable","display","locator"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["context_library_file"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true},"context_library_id":{"type":"string"},"file_id":{"type":"string"},"file_name":{"type":"string"},"media_type":{"type":"string"}},"required":["index","type","id","doc_id","url","display","locator","context_library_id","file_id","file_name","media_type"],"additionalProperties":false}]}},"progress":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"step":{"type":"string","enum":["retrievalQueryGeneration","retrieval","outputGeneration","metricEvaluation"]}},"required":["step"],"additionalProperties":false},{"type":"object","properties":{"step":{"type":"string","enum":["sendProgressUpdate"]},"text":{"type":"string"}},"required":["step","text"],"additionalProperties":false}]}}},"required":["id","role","usage"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"metadata":{"type":"object","properties":{},"required":[],"additionalProperties":{"oneOf":[{"type":"string","nullable":true},{"type":"number","nullable":true},{"type":"boolean","nullable":true}]}},"role":{"type":"string","enum":["assistant"]},"error":{"type":"object","properties":{"errorCode":{"type":"string","enum":["tokens_exceeded","unknown","invalid_json"]}},"required":["errorCode"],"additionalProperties":false},"text":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"number"},"outputTokens":{"type":"number"}},"required":["inputTokens","outputTokens"],"additionalProperties":false},"progress":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"step":{"type":"string","enum":["retrievalQueryGeneration","retrieval","outputGeneration","metricEvaluation"]}},"required":["step"],"additionalProperties":false},{"type":"object","properties":{"step":{"type":"string","enum":["sendProgressUpdate"]},"text":{"type":"string"}},"required":["step","text"],"additionalProperties":false}]}},"references":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["literature"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string","deprecated":true},"journal_title":{"type":"string","deprecated":true},"year":{"type":"number"},"pub_date":{"type":"string","nullable":true},"doi":{"type":"string","nullable":true},"authors":{"type":"string","nullable":true,"deprecated":true},"types":{"type":"array","items":{"type":"string"}},"is_high_impact_journal":{"type":"boolean"},"is_highly_cited_article":{"type":"boolean"},"is_recently_published":{"type":"boolean"},"pmid":{"type":"number","nullable":true},"authors_structured":{"type":"array","items":{"type":"object","properties":{"first_name":{"type":"string","nullable":true},"last_name":{"type":"string"},"initials":{"type":"string","nullable":true}},"required":["last_name"],"additionalProperties":false}},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"authors":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","authors","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true}},"required":["index","type","id","doc_id","url","title","journal_title","year","pub_date","doi","authors","types","authors_structured","display","locator"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["compound"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"generic_name":{"type":"string"},"manufactured_name":{"type":"string"},"effective_time":{"type":"string"},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true}},"required":["index","type","id","doc_id","url","generic_name","manufactured_name","effective_time","display","locator"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["billing_code"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"code":{"type":"string"},"code_system":{"type":"string","enum":["icd-10-cm","hcpcs"]},"description":{"type":"string"},"is_billable":{"type":"boolean"},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true}},"required":["index","type","id","doc_id","url","code","code_system","description","is_billable","display","locator"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["context_library_file"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true},"context_library_id":{"type":"string"},"file_id":{"type":"string"},"file_name":{"type":"string"},"media_type":{"type":"string"}},"required":["index","type","id","doc_id","url","display","locator","context_library_id","file_id","file_name","media_type"],"additionalProperties":false}]}}},"required":["id","role","usage","error"],"additionalProperties":false}]}},"text/event-stream":{"schema":{"type":"string","example":"event: id\ndata: \"728134b6-401c-433e-91e5-fd14c8d12fa2\"\n\nevent: role\ndata: \"assistant\"\n\nevent: metadata\ndata: {\"externalId\":\"abc-123\"}\n\nevent: text\ndata: \"Hello,\"\n\nevent: text\ndata: \" world\"\n\nevent: progress\ndata: {\"event\": \"progress\", \"step\": \"retrievalQueryGeneration\"}\n\nevent: references\ndata: [{\"index\": 1, \"title\": \"Example\"}]\n\nevent: usage\ndata: {\"inputTokens\":2506,\"outputTokens\":23}"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string","example":"API key not found in header"}}}},"422":{"description":"Request validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"operationId":"postV2Messages","tags":["Messages"],"parameters":[],"description":"Generate a message with an explicit version.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"}},"required":["role","content"],"additionalProperties":false}},"stream":{"type":"boolean"},"metadata":{"type":"object","properties":{},"required":[],"additionalProperties":{"oneOf":[{"type":"string","nullable":true},{"type":"number","nullable":true},{"type":"boolean","nullable":true}]}},"response_format":{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"example":{"type":"json_object"}},"version":{"type":"string","enum":["5.0-2025-08-22","5.5-2026-03-31"],"example":"5.5-2026-03-31"},"fileUploadIds":{"type":"array","items":{"type":"string"}}},"required":["messages","version"],"additionalProperties":false}}}}}},"/messages":{"post":{"responses":{"200":{"description":"Successful response body","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"metadata":{"type":"object","properties":{},"required":[],"additionalProperties":{"oneOf":[{"type":"string","nullable":true},{"type":"number","nullable":true},{"type":"boolean","nullable":true}]}},"role":{"type":"string","enum":["assistant"]},"text":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"number"},"outputTokens":{"type":"number"}},"required":["inputTokens","outputTokens"],"additionalProperties":false},"references":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["literature"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string","deprecated":true},"journal_title":{"type":"string","deprecated":true},"year":{"type":"number"},"pub_date":{"type":"string","nullable":true},"doi":{"type":"string","nullable":true},"authors":{"type":"string","nullable":true,"deprecated":true},"types":{"type":"array","items":{"type":"string"}},"is_high_impact_journal":{"type":"boolean"},"is_highly_cited_article":{"type":"boolean"},"is_recently_published":{"type":"boolean"},"pmid":{"type":"number","nullable":true},"authors_structured":{"type":"array","items":{"type":"object","properties":{"first_name":{"type":"string","nullable":true},"last_name":{"type":"string"},"initials":{"type":"string","nullable":true}},"required":["last_name"],"additionalProperties":false}},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"authors":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","authors","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true}},"required":["index","type","id","doc_id","url","title","journal_title","year","pub_date","doi","authors","types","authors_structured","display","locator"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["compound"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"generic_name":{"type":"string"},"manufactured_name":{"type":"string"},"effective_time":{"type":"string"},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true}},"required":["index","type","id","doc_id","url","generic_name","manufactured_name","effective_time","display","locator"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["billing_code"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"code":{"type":"string"},"code_system":{"type":"string","enum":["icd-10-cm","hcpcs"]},"description":{"type":"string"},"is_billable":{"type":"boolean"},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true}},"required":["index","type","id","doc_id","url","code","code_system","description","is_billable","display","locator"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["context_library_file"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true},"context_library_id":{"type":"string"},"file_id":{"type":"string"},"file_name":{"type":"string"},"media_type":{"type":"string"}},"required":["index","type","id","doc_id","url","display","locator","context_library_id","file_id","file_name","media_type"],"additionalProperties":false}]}},"progress":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"step":{"type":"string","enum":["retrievalQueryGeneration","retrieval","outputGeneration","metricEvaluation"]}},"required":["step"],"additionalProperties":false},{"type":"object","properties":{"step":{"type":"string","enum":["sendProgressUpdate"]},"text":{"type":"string"}},"required":["step","text"],"additionalProperties":false}]}}},"required":["id","role","usage"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string"},"metadata":{"type":"object","properties":{},"required":[],"additionalProperties":{"oneOf":[{"type":"string","nullable":true},{"type":"number","nullable":true},{"type":"boolean","nullable":true}]}},"role":{"type":"string","enum":["assistant"]},"error":{"type":"object","properties":{"errorCode":{"type":"string","enum":["tokens_exceeded","unknown","invalid_json"]}},"required":["errorCode"],"additionalProperties":false},"text":{"type":"string"},"usage":{"type":"object","properties":{"inputTokens":{"type":"number"},"outputTokens":{"type":"number"}},"required":["inputTokens","outputTokens"],"additionalProperties":false},"progress":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"step":{"type":"string","enum":["retrievalQueryGeneration","retrieval","outputGeneration","metricEvaluation"]}},"required":["step"],"additionalProperties":false},{"type":"object","properties":{"step":{"type":"string","enum":["sendProgressUpdate"]},"text":{"type":"string"}},"required":["step","text"],"additionalProperties":false}]}},"references":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["literature"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"title":{"type":"string","deprecated":true},"journal_title":{"type":"string","deprecated":true},"year":{"type":"number"},"pub_date":{"type":"string","nullable":true},"doi":{"type":"string","nullable":true},"authors":{"type":"string","nullable":true,"deprecated":true},"types":{"type":"array","items":{"type":"string"}},"is_high_impact_journal":{"type":"boolean"},"is_highly_cited_article":{"type":"boolean"},"is_recently_published":{"type":"boolean"},"pmid":{"type":"number","nullable":true},"authors_structured":{"type":"array","items":{"type":"object","properties":{"first_name":{"type":"string","nullable":true},"last_name":{"type":"string"},"initials":{"type":"string","nullable":true}},"required":["last_name"],"additionalProperties":false}},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"authors":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","authors","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true}},"required":["index","type","id","doc_id","url","title","journal_title","year","pub_date","doi","authors","types","authors_structured","display","locator"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["compound"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"generic_name":{"type":"string"},"manufactured_name":{"type":"string"},"effective_time":{"type":"string"},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true}},"required":["index","type","id","doc_id","url","generic_name","manufactured_name","effective_time","display","locator"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["billing_code"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"code":{"type":"string"},"code_system":{"type":"string","enum":["icd-10-cm","hcpcs"]},"description":{"type":"string"},"is_billable":{"type":"boolean"},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true}},"required":["index","type","id","doc_id","url","code","code_system","description","is_billable","display","locator"],"additionalProperties":false},{"type":"object","properties":{"index":{"type":"number","deprecated":true},"type":{"type":"string","enum":["context_library_file"]},"id":{"type":"string"},"doc_id":{"type":"string"},"url":{"type":"string"},"display":{"type":"object","properties":{"heading":{"type":"string"},"subheading":{"type":"string","nullable":true},"detail":{"type":"string","nullable":true}},"required":["heading","subheading","detail"],"additionalProperties":false},"locator":{"type":"object","properties":{"page":{"type":"number","nullable":true},"section":{"type":"string","nullable":true},"chunkIndex":{"type":"number","nullable":true},"chunkCount":{"type":"number","nullable":true}},"required":["page","section","chunkIndex","chunkCount"],"additionalProperties":false,"nullable":true},"context_library_id":{"type":"string"},"file_id":{"type":"string"},"file_name":{"type":"string"},"media_type":{"type":"string"}},"required":["index","type","id","doc_id","url","display","locator","context_library_id","file_id","file_name","media_type"],"additionalProperties":false}]}}},"required":["id","role","usage","error"],"additionalProperties":false}]}},"text/event-stream":{"schema":{"type":"string","example":"event: id\ndata: \"728134b6-401c-433e-91e5-fd14c8d12fa2\"\n\nevent: role\ndata: \"assistant\"\n\nevent: metadata\ndata: {\"externalId\":\"abc-123\"}\n\nevent: text\ndata: \"Hello,\"\n\nevent: text\ndata: \" world\"\n\nevent: progress\ndata: {\"event\": \"progress\", \"step\": \"retrievalQueryGeneration\"}\n\nevent: references\ndata: [{\"index\": 1, \"title\": \"Example\"}]\n\nevent: usage\ndata: {\"inputTokens\":2506,\"outputTokens\":23}"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string","example":"API key not found in header"}}}},"422":{"description":"Request validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"operationId":"postMessages","tags":["Deprecated"],"parameters":[],"description":"Generate a message. Deprecated: use /v2/messages instead.","deprecated":true,"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"}},"required":["role","content"],"additionalProperties":false}},"stream":{"type":"boolean"},"metadata":{"type":"object","properties":{},"required":[],"additionalProperties":{"oneOf":[{"type":"string","nullable":true},{"type":"number","nullable":true},{"type":"boolean","nullable":true}]}},"response_format":{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false}},"required":["messages"],"additionalProperties":false}}}}}},"/v2/uploads/prepare":{"post":{"responses":{"200":{"description":"Signed upload URL and file id","content":{"application/json":{"schema":{"type":"object","properties":{"fileUploadId":{"type":"string","format":"uuid"},"signedUploadUrl":{"type":"string"},"fileSizeInBytes":{"type":"integer"}},"required":["fileUploadId","signedUploadUrl","fileSizeInBytes"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"operationId":"postV2UploadsPrepare","tags":["Uploads"],"parameters":[],"description":"Prepare a file upload. Returns a signed URL for resumable direct upload and a fileUploadId for consuming APIs: Scribe (audio, `application/json`) and Messages (images, PDFs, and documents via `fileUploadIds` on Glass 5.5). Audio may be up to 1 GB; documents and images are capped at 50 MB.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"originalFileName":{"type":"string"},"fileSizeInBytes":{"type":"number"}},"required":["originalFileName","fileSizeInBytes"],"additionalProperties":false}}}}}},"/v2/scribe/jobs":{"post":{"responses":{"202":{"description":"Job accepted","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["processing"]}},"required":["jobId","status"]}}}},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"429":{"description":"Rate limited","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"operationId":"postV2ScribeJobs","tags":["Scribing"],"parameters":[],"description":"Create an asynchronous Scribe job (JSON only, after POST /v2/uploads/prepare). Returns 202 with jobId; poll GET /v2/scribe/jobs/:jobId until status is completed or failed.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fileUploadId":{"type":"string"},"options":{"type":"object","properties":{"language":{"type":"string","enum":["id","auto","or","en","es","fr","de","nl","da","no","sv","fi","ar_en","ar","bg","bn","ca","cmn","cs","cy","el","et","fa","ga","gl","he","hi","hr","hu","it","ja","ko","lt","lv","mn","mr","ms","mt","pl","pt","ro","ru","sk","sl","sw","ta","th","tl","tr","uk","ur","vi","yue","cmn_en","en_ms","en_ta","cmn_en_ms_ta","es_bilingual","ne","pa","ast","ps","ba","be","eo","eu","ia","ug","ab","af","sq","am","hy","az","bs","my","ckb","ckb_ir","ka","gu","ht","ha","is","jv","kab","kn","kk","km","rw","ky","lg","mk","ml","mhr","mi","sr","si","so","su","tt","te","uz","wo","zu"]},"diarize":{"type":"boolean"},"generateNote":{"type":"object","properties":{"prompt":{"type":"string"},"version":{"type":"string","enum":["5.0-2025-08-22","5.5-2026-03-31","5.6-max-2026-06-17-preview"]}},"required":["version"],"additionalProperties":false}},"required":["language"],"additionalProperties":false}},"required":["fileUploadId","options"],"additionalProperties":false}}}}}},"/v2/scribe/jobs/{scribeJobId}":{"get":{"responses":{"200":{"description":"Job status and optional result"},"401":{"description":"Unauthorized"},"404":{"description":"Job not found"},"422":{"description":"Invalid job id"}},"operationId":"getV2ScribeJobsByScribeJobId","tags":["Scribing"],"parameters":[{"name":"scribeJobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"description":"Poll async Scribe job status. When status is completed, `result` matches synchronous Scribe JSON (transcript, optional note, usage)."}},"/v2/scribe":{"post":{"responses":{"200":{"description":"Successful transcription response","content":{"application/json":{"schema":{"type":"object","properties":{"transcript":{"type":"string"},"note":{"type":"object","properties":{"text":{"type":"string"},"references":{"type":"array","items":{"type":"object"}},"error":{"type":"object","properties":{"errorCode":{"type":"string"}}}}},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer"},"outputTokens":{"type":"integer"},"durationInSeconds":{"type":"number"}}}},"required":["transcript","usage"]}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string","example":"API key not found in header"}}}},"422":{"description":"Request validation error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}},"operationId":"postV2Scribe","tags":["Scribing"],"parameters":[],"description":"Transcribe an audio file with speaker diarization. Optionally generates a clinical note from the transcript. Send `multipart/form-data` with `audio` (up to 30 MB) and `options`, or `application/json` with `fileUploadId` and `options` after `POST /v2/uploads/prepare` for larger files (up to 1 GB).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fileUploadId":{"type":"string"},"options":{"type":"object","properties":{"language":{"type":"string","enum":["id","auto","or","en","es","fr","de","nl","da","no","sv","fi","ar_en","ar","bg","bn","ca","cmn","cs","cy","el","et","fa","ga","gl","he","hi","hr","hu","it","ja","ko","lt","lv","mn","mr","ms","mt","pl","pt","ro","ru","sk","sl","sw","ta","th","tl","tr","uk","ur","vi","yue","cmn_en","en_ms","en_ta","cmn_en_ms_ta","es_bilingual","ne","pa","ast","ps","ba","be","eo","eu","ia","ug","ab","af","sq","am","hy","az","bs","my","ckb","ckb_ir","ka","gu","ht","ha","is","jv","kab","kn","kk","km","rw","ky","lg","mk","ml","mhr","mi","sr","si","so","su","tt","te","uz","wo","zu"]},"diarize":{"type":"boolean"},"generateNote":{"type":"object","properties":{"prompt":{"type":"string"},"version":{"type":"string","enum":["5.0-2025-08-22","5.5-2026-03-31","5.6-max-2026-06-17-preview"]}},"required":["version"],"additionalProperties":false}},"required":["language"],"additionalProperties":false}},"required":["fileUploadId","options"],"additionalProperties":false}},"multipart/form-data":{"schema":{"type":"object","properties":{"audio":{"type":"string","format":"binary"},"options":{"type":"string"}},"required":["audio","options"]}}}}}}}}