{"openapi": "3.1.0", "info": {"title": "KikiDoc ClientApi", "version": "0.1.0"}, "paths": {"/pdf/v1/html": {"post": {"summary": "Render Html", "operationId": "render_html_pdf_v1_html_post", "parameters": [{"name": "X-API-Key", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "X-Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RenderHtmlRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/pdf/v1/template": {"post": {"summary": "Render Template Pdf", "operationId": "render_template_pdf_pdf_v1_template_post", "parameters": [{"name": "X-API-Key", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "X-Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RenderTemplateRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/pdf/v1/templates": {"get": {"summary": "Get Templates", "operationId": "get_templates_pdf_v1_templates_get", "parameters": [{"name": "X-API-Key", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "X-Api-Key"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TemplateListResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/pdf/v1/url": {"post": {"summary": "Render Url", "operationId": "render_url_pdf_v1_url_post", "parameters": [{"name": "X-API-Key", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "X-Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RenderUrlRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/pdf/v1/screenshot": {"post": {"summary": "Screenshot", "operationId": "screenshot_pdf_v1_screenshot_post", "parameters": [{"name": "X-API-Key", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "X-Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScreenshotRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/pdf/v1/async": {"post": {"summary": "Submit Async Render", "operationId": "submit_async_render_pdf_v1_async_post", "parameters": [{"name": "X-API-Key", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "X-Api-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AsyncRenderRequest"}}}}, "responses": {"202": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/JobSubmitResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/pdf/v1/jobs/{job_id}": {"get": {"summary": "Get Job", "operationId": "get_job_pdf_v1_jobs__job_id__get", "parameters": [{"name": "job_id", "in": "path", "required": true, "schema": {"type": "string", "format": "uuid", "title": "Job Id"}}, {"name": "X-API-Key", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "X-Api-Key"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/JobStatusResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/healthz": {"get": {"summary": "Healthz", "operationId": "healthz_healthz_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"additionalProperties": {"type": "string"}, "type": "object", "title": "Response Healthz Healthz Get"}}}}}}}}, "components": {"schemas": {"AsyncRenderRequest": {"properties": {"html": {"type": "string", "minLength": 1, "title": "Html"}, "data": {"additionalProperties": true, "type": "object", "title": "Data"}, "options": {"$ref": "#/components/schemas/RenderOptionsModel"}, "security": {"anyOf": [{"$ref": "#/components/schemas/SecurityModel"}, {"type": "null"}]}, "webhook_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Webhook Url"}}, "type": "object", "required": ["html"], "title": "AsyncRenderRequest", "description": "``POST /pdf/v1/async`` body \u2014 submit an HTML render to run in the background.\n\nThe artifact is always delivered as a signed URL (async never streams bytes).\nSupply ``webhook_url`` to be notified on completion with a signed payload."}, "CredentialsModel": {"properties": {"username": {"type": "string", "title": "Username"}, "password": {"type": "string", "title": "Password"}}, "type": "object", "required": ["username", "password"], "title": "CredentialsModel", "description": "HTTP basic-auth credentials forwarded to a fetched URL."}, "DeliveryMode": {"type": "string", "enum": ["inline", "url"], "title": "DeliveryMode", "description": "How a rendered artifact is returned.\n\n``inline`` (default) streams the raw bytes back in the response body, preserving\nthe original behavior. ``url`` uploads the artifact to cloud storage and returns\na time-limited signed URL instead (see :class:`SignedUrlResponse`)."}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "ImageFormat": {"type": "string", "enum": ["png", "jpeg", "webp"], "title": "ImageFormat", "description": "Supported screenshot output formats."}, "JobStatusResponse": {"properties": {"job_id": {"type": "string", "title": "Job Id"}, "status": {"type": "string", "title": "Status"}, "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Url"}, "expires_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Expires At"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "type": "object", "required": ["job_id", "status"], "title": "JobStatusResponse", "description": "JSON returned by ``GET /pdf/v1/jobs/{job_id}``: status + result when done."}, "JobSubmitResponse": {"properties": {"job_id": {"type": "string", "title": "Job Id"}, "status": {"type": "string", "title": "Status"}}, "type": "object", "required": ["job_id", "status"], "title": "JobSubmitResponse", "description": "JSON returned by ``POST /pdf/v1/async``: the new job id + initial status."}, "MarginsModel": {"properties": {"top": {"type": "string", "title": "Top", "default": "0"}, "right": {"type": "string", "title": "Right", "default": "0"}, "bottom": {"type": "string", "title": "Bottom", "default": "0"}, "left": {"type": "string", "title": "Left", "default": "0"}}, "type": "object", "title": "MarginsModel"}, "Orientation": {"type": "string", "enum": ["portrait", "landscape"], "title": "Orientation"}, "PageFormat": {"type": "string", "enum": ["A3", "A4", "Letter", "Legal", "Tabloid"], "title": "PageFormat", "description": "Supported PDF page sizes."}, "RenderHtmlRequest": {"properties": {"html": {"type": "string", "minLength": 1, "title": "Html"}, "data": {"additionalProperties": true, "type": "object", "title": "Data"}, "options": {"$ref": "#/components/schemas/RenderOptionsModel"}, "security": {"anyOf": [{"$ref": "#/components/schemas/SecurityModel"}, {"type": "null"}]}, "delivery": {"$ref": "#/components/schemas/DeliveryMode", "default": "inline"}}, "type": "object", "required": ["html"], "title": "RenderHtmlRequest", "description": "``POST /pdf/v1/html`` body."}, "RenderOptionsModel": {"properties": {"format": {"$ref": "#/components/schemas/PageFormat", "default": "A4"}, "orientation": {"$ref": "#/components/schemas/Orientation", "default": "portrait"}, "margins": {"$ref": "#/components/schemas/MarginsModel"}, "include_page_numbers": {"type": "boolean", "title": "Include Page Numbers", "default": false}}, "type": "object", "title": "RenderOptionsModel"}, "RenderTemplateRequest": {"properties": {"template_name": {"type": "string", "minLength": 1, "title": "Template Name"}, "data": {"additionalProperties": true, "type": "object", "title": "Data"}, "options": {"$ref": "#/components/schemas/RenderOptionsModel"}, "security": {"anyOf": [{"$ref": "#/components/schemas/SecurityModel"}, {"type": "null"}]}, "delivery": {"$ref": "#/components/schemas/DeliveryMode", "default": "inline"}}, "type": "object", "required": ["template_name"], "title": "RenderTemplateRequest", "description": "``POST /pdf/v1/template`` body."}, "RenderUrlRequest": {"properties": {"url": {"type": "string", "minLength": 1, "title": "Url"}, "credentials": {"anyOf": [{"$ref": "#/components/schemas/CredentialsModel"}, {"type": "null"}]}, "options": {"$ref": "#/components/schemas/RenderOptionsModel"}, "security": {"anyOf": [{"$ref": "#/components/schemas/SecurityModel"}, {"type": "null"}]}, "delivery": {"$ref": "#/components/schemas/DeliveryMode", "default": "inline"}}, "type": "object", "required": ["url"], "title": "RenderUrlRequest", "description": "``POST /pdf/v1/url`` body \u2014 render a fetched URL to PDF."}, "ScreenshotOptionsModel": {"properties": {"format": {"$ref": "#/components/schemas/ImageFormat", "default": "png"}, "full_page": {"type": "boolean", "title": "Full Page", "default": false}, "width": {"type": "integer", "exclusiveMinimum": 0.0, "title": "Width", "default": 1280}, "height": {"type": "integer", "exclusiveMinimum": 0.0, "title": "Height", "default": 720}, "quality": {"anyOf": [{"type": "integer", "maximum": 100.0, "minimum": 0.0}, {"type": "null"}], "title": "Quality"}}, "type": "object", "title": "ScreenshotOptionsModel"}, "ScreenshotRequest": {"properties": {"html": {"anyOf": [{"type": "string", "minLength": 1}, {"type": "null"}], "title": "Html"}, "url": {"anyOf": [{"type": "string", "minLength": 1}, {"type": "null"}], "title": "Url"}, "data": {"additionalProperties": true, "type": "object", "title": "Data"}, "credentials": {"anyOf": [{"$ref": "#/components/schemas/CredentialsModel"}, {"type": "null"}]}, "options": {"$ref": "#/components/schemas/ScreenshotOptionsModel"}, "delivery": {"$ref": "#/components/schemas/DeliveryMode", "default": "inline"}}, "type": "object", "title": "ScreenshotRequest", "description": "``POST /pdf/v1/screenshot`` body. Exactly one of ``html`` or ``url`` is required."}, "SecurityModel": {"properties": {"user_password": {"type": "string", "title": "User Password"}, "owner_password": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Password"}, "annotations": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Annotations"}, "extract_content": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Extract Content"}, "modify": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Modify"}, "assemble": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Assemble"}, "print": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Print"}, "print_high_res": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Print High Res"}}, "type": "object", "required": ["user_password"], "title": "SecurityModel", "description": "Optional document security, mapped onto core's ``SecuritySettings``.\n\n``user_password`` is required to open the output. The 6 permission flags are\ntri-state (``None`` = unspecified/allowed) and mirror the .NET request."}, "TemplateListResponse": {"properties": {"templates": {"items": {"$ref": "#/components/schemas/TemplateSummary"}, "type": "array", "title": "Templates"}}, "type": "object", "required": ["templates"], "title": "TemplateListResponse"}, "TemplateSummary": {"properties": {"id": {"type": "integer", "title": "Id"}, "name": {"type": "string", "title": "Name"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}}, "type": "object", "required": ["id", "name"], "title": "TemplateSummary", "description": "One row in the ``GET /pdf/v1/templates`` listing."}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}, "input": {"title": "Input"}, "ctx": {"type": "object", "title": "Context"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}}}, "servers": [{"url": "https://api.kikidoc.dev"}]}