{"openapi":"3.1.0","info":{"title":"Pappur Agent API","description":"Pappur Agent API with private SQLite account and usage metadata. 1 page = 1 package token, including document vectorization. Pending jobs belong to the caller workspace and can be cancelled. GET /health reports public queue occupancy.","version":"0.5.0"},"paths":{"/api/account/register":{"post":{"summary":"Register","operationId":"register_api_account_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Registration"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/login":{"post":{"summary":"Login","operationId":"login_api_account_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/setup":{"post":{"summary":"Admin Setup","operationId":"admin_setup_api_admin_setup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPassword"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/logout":{"post":{"summary":"Logout","operationId":"logout_api_account_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/api/account/password":{"post":{"summary":"Password Change","operationId":"password_change_api_account_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChange"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/logout-all":{"post":{"summary":"Logout All","operationId":"logout_all_api_account_logout_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/account/forgot-password":{"post":{"summary":"Forgot","operationId":"forgot_api_account_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/resend-verification":{"post":{"summary":"Resend","operationId":"resend_api_account_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/reset-password":{"post":{"summary":"Reset Password","operationId":"reset_password_api_account_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reset"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/verify-email":{"post":{"summary":"Verify Email","operationId":"verify_email_api_account_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account":{"get":{"summary":"Account","operationId":"account_api_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/resources":{"get":{"summary":"Resource State","operationId":"resource_state_api_admin_resources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Resource Change","operationId":"resource_change_api_admin_resources_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceInput"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/edition":{"get":{"summary":"Edition","operationId":"edition_api_edition_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/packages":{"get":{"summary":"Packages","operationId":"packages_api_packages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/keys":{"get":{"summary":"Keys","operationId":"keys_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Create Key","operationId":"create_key_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyInput"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/keys/{id}":{"delete":{"summary":"Revoke Key","operationId":"revoke_key_api_keys__id__delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspace":{"post":{"summary":"Select Workspace","operationId":"select_workspace_api_workspace_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/usage":{"get":{"summary":"Usage","operationId":"usage_api_usage_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Check model readiness and resource limits","operationId":"engineHealth","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"507":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/read":{"post":{"summary":"Create a query embedding for the customer database, optionally rank supplied candidates","operationId":"readDocuments","parameters":[{"name":"max_charge_tokens","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Charge Tokens"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128},"description":"Unique per input; reuse for identical retry only."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadInput"}}}},"responses":{"202":{"description":"Accepted: queued while busy, then running. Poll job_id or cancel your own job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"API key required or revoked"},"402":{"description":"Insufficient balance or maximum spend exceeded"},"429":{"description":"Bounded queue full; no job accepted. Honor Retry-After."}},"security":[{"PappurKey":[]}]}},"/v1/query":{"post":{"summary":"Synchronously embed a query with the independent query worker","operationId":"queryDocuments","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadInput"}}},"required":true},"responses":{"200":{"description":"Synchronous query result; the independent warm model runs alongside document processing. job_id supports the optional included ranking and cleanup.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Result"},{"type":"object","required":["job_id"],"properties":{"job_id":{"type":"string"}}}]}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"API key required or revoked"},"402":{"description":"Insufficient balance or maximum spend exceeded"},"429":{"description":"Bounded queue full; no job accepted. Honor Retry-After."}},"security":[{"PappurKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128},"description":"Unique per input; reuse for identical retry only."}]}},"/v1/read/{job_id}/rank":{"post":{"summary":"Rank customer database candidates once using an existing paid query embedding","operationId":"rankReadCandidates","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Candidates"}}}},"responses":{"200":{"description":"Ranked customer source references. Included in the original query token; identical retry is free.","content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string"},"matches":{"type":"array","items":{"type":"object","additionalProperties":true}},"additional_tokens":{"type":"integer","const":0}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"API key required or revoked"},"402":{"description":"Insufficient balance or maximum spend exceeded"},"429":{"description":"Bounded queue full; no job accepted. Honor Retry-After."}},"security":[{"PappurKey":[]}]}},"/v1/embed":{"post":{"summary":"Embed a document, text or prepared text items","operationId":"embedSources","parameters":[{"name":"filename","in":"query","required":false,"schema":{"type":"string","default":"texts.json","title":"Filename"}},{"name":"max_charge_tokens","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Charge Tokens"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128},"description":"Unique per input; reuse for identical retry only."}],"responses":{"202":{"description":"Accepted: queued while busy, then running. Poll job_id or cancel your own job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded queue full; no job accepted. Honor Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds before retrying."}}},"507":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key required or revoked"},"402":{"description":"Insufficient balance or maximum spend exceeded"}},"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"$ref":"#/components/schemas/EmbeddingInput"},"example":{"text":"Yapı aplikasyon projesinin koordinat tablosu."}},"text/plain":{"schema":{"type":"string"}}}},"security":[{"PappurKey":[]}]}},"/v1/jobs/{job_id}":{"get":{"summary":"Poll job status","description":"Job status. `wait` (0-60 s) holds the response until the status changes,\nso agents without a public address need neither webhooks nor tight polling.","operationId":"getJob","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"wait","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Wait"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded queue full; no job accepted. Honor Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"507":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key required or revoked"},"402":{"description":"Insufficient balance or maximum spend exceeded"}},"security":[{"PappurKey":[]}]},"delete":{"summary":"Cancel or erase a job","operationId":"deleteJob","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded queue full; no job accepted. Honor Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"507":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key required or revoked"},"402":{"description":"Insufficient balance or maximum spend exceeded"}},"security":[{"PappurKey":[]}]}},"/v1/jobs/{job_id}/result":{"get":{"summary":"Read vectors, source references and measured usage","operationId":"getResult","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Result"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded queue full; no job accepted. Honor Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"507":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key required or revoked"},"402":{"description":"Insufficient balance or maximum spend exceeded"}},"security":[{"PappurKey":[]}]}},"/v1/jobs/{job_id}/download/{name}":{"get":{"summary":"Download an exported artifact","operationId":"downloadExport","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Artifact bytes selected from result.exports","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"400":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Bounded queue full; no job accepted. Honor Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"507":{"description":"Request rejected; see detail code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key required or revoked"},"402":{"description":"Insufficient balance or maximum spend exceeded"}},"security":[{"PappurKey":[]}]}},"/api/admin/summary":{"get":{"summary":"Summary","operationId":"summary_api_admin_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/records/{name}":{"get":{"summary":"Records","operationId":"records_api_admin_records__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users":{"get":{"summary":"Users","operationId":"users_api_admin_users_get","parameters":[{"name":"email","in":"query","required":false,"schema":{"type":"string","default":"","title":"Email"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/jobs":{"get":{"summary":"Jobs","operationId":"jobs_api_admin_jobs_get","parameters":[{"name":"email","in":"query","required":false,"schema":{"type":"string","default":"","title":"Email"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"created_at","title":"Sort"}},{"name":"order","in":"query","required":false,"schema":{"type":"string","default":"desc","title":"Order"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/limits":{"get":{"summary":"Get Limits","operationId":"get_limits_api_admin_limits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"summary":"Put Limits","operationId":"put_limits_api_admin_limits_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitsInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{id}/ledger":{"get":{"summary":"Account Ledger","operationId":"account_ledger_api_admin_users__id__ledger_get","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{id}":{"patch":{"summary":"Change User","operationId":"change_user_api_admin_users__id__patch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeUser"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{id}/recovery":{"post":{"summary":"Recovery","operationId":"recovery_api_admin_users__id__recovery_post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{id}/send-link":{"post":{"summary":"Send Link","description":"Email a link the admin just created to that user's own address (never elsewhere).","operationId":"send_link_api_admin_users__id__send_link_post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{id}/sessions":{"delete":{"summary":"Revoke Sessions","operationId":"revoke_sessions_api_admin_users__id__sessions_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{id}/credits":{"post":{"summary":"Credit","operationId":"credit_api_admin_users__id__credits_post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Adjustment"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/packages":{"post":{"summary":"Package","operationId":"package_api_admin_packages_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewPackage"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/packages/{id}":{"put":{"summary":"Update Package","operationId":"update_package_api_admin_packages__id__put","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/keys":{"post":{"summary":"Create Key","operationId":"create_key_api_admin_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminKey"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/keys/{id}/revoke":{"post":{"summary":"Key Revoke","operationId":"key_revoke_api_admin_keys__id__revoke_post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/jobs/{id}/cancel":{"post":{"summary":"Job Cancel","operationId":"job_cancel_api_admin_jobs__id__cancel_post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/integrations/smtp":{"get":{"summary":"Smtp Config","operationId":"smtp_config_api_admin_integrations_smtp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"summary":"Save Smtp","operationId":"save_smtp_api_admin_integrations_smtp_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SMTPInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/integrations/smtp/test":{"post":{"summary":"Test Smtp","operationId":"test_smtp_api_admin_integrations_smtp_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/integrations/smtp/send-test":{"post":{"summary":"Send Test Email","description":"Send one real message with the saved settings (rate limited, audited).","operationId":"send_test_email_api_admin_integrations_smtp_send_test_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEmail"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/integrations/purchase-webhook":{"get":{"summary":"Webhook Config","operationId":"webhook_config_api_admin_integrations_purchase_webhook_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"summary":"Save Webhook","operationId":"save_webhook_api_admin_integrations_purchase_webhook_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/integrations/purchase-webhook/secret":{"post":{"summary":"Rotate Webhook","operationId":"rotate_webhook_api_admin_integrations_purchase_webhook_secret_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/purchase":{"post":{"summary":"Credit an externally purchased token package","description":"Admin UI provides a URL per package: /webhooks/purchase?package_id=starter. The package_id in the signed JSON body must match the URL. user_id is the Pappur account email address. A fresh ID is generated per click only if the purchase link template contains {transaction_id}; otherwise the sales system supplies its own unique transaction ID. Preserve the same ID across delivery retries. HMAC-SHA256 of timestamp + dot + exact body bytes. X-Pappur-Timestamp is Unix seconds; X-Pappur-Signature is sha256=<hex>. Timestamp window is 300 seconds. Extra token/price fields are ignored. Repeated identical transactions return 200 with the original grant; conflicting transactions return 409.","operationId":"purchase_webhook_webhooks_purchase_post","parameters":[{"name":"package_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$"},{"type":"null"}],"title":"Package Id"}},{"name":"X-Pappur-Timestamp","in":"header","required":true,"schema":{"type":"string"},"description":"Current Unix seconds; freshly sign every delivery/retry."},{"name":"X-Pappur-Signature","in":"header","required":true,"schema":{"type":"string","pattern":"^sha256=[a-fA-F0-9]{64}$"}}],"responses":{"200":{"description":"Identical transaction replay; original token amount returned","content":{"application/json":{"schema":{}}}},"201":{"description":"Package credited exactly once"},"401":{"description":"Signature/timestamp rejected"},"409":{"description":"Package URL mismatch, conflicting transaction, inactive package or unavailable account"},"413":{"description":"Body exceeds 16 KiB"},"422":{"description":"Invalid signed payload"},"503":{"description":"Disabled, maintenance or temporary metadata error"},"429":{"description":"Webhook rate limit; honor Retry-After."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"transaction_id":{"pattern":"^[A-Za-z0-9_.:-]{1,128}$","title":"Transaction Id","type":"string"},"package_id":{"pattern":"^[a-zA-Z0-9_-]{1,64}$","title":"Package Id","type":"string"},"user_id":{"description":"Pappur account email address","format":"email","maxLength":254,"minLength":3,"title":"User Id","type":"string"}},"required":["transaction_id","package_id","user_id"],"title":"Notification","type":"object"},"example":{"transaction_id":"sale-2026-001","package_id":"starter","user_id":"ali@example.com"}}}},"security":[]}},"/api/admin/backups/export":{"post":{"summary":"Export","operationId":"export_api_admin_backups_export_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/backups/upload":{"post":{"summary":"Upload","description":"Step 1 of restore: store the encrypted file only; nothing is read yet.","operationId":"upload_api_admin_backups_upload_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/backups/restore":{"post":{"summary":"Restore","operationId":"restore_api_admin_backups_restore_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Restore"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/backups/review":{"post":{"summary":"Review","operationId":"review_api_admin_backups_review_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contact":{"post":{"summary":"Submit","operationId":"submit_api_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactInput"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/contacts":{"get":{"summary":"Contacts","operationId":"contacts_api_admin_contacts_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/contacts/{id}/handled":{"post":{"summary":"Mark Handled","operationId":"mark_handled_api_admin_contacts__id__handled_post","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Handled"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Adjustment":{"properties":{"units":{"type":"integer","maximum":1000000000.0,"minimum":-1000000000.0,"title":"Units"},"operation_key":{"type":"string","maxLength":128,"minLength":1,"title":"Operation Key"},"reason":{"type":"string","maxLength":500,"minLength":3,"title":"Reason"}},"type":"object","required":["units","operation_key","reason"],"title":"Adjustment"},"AdminKey":{"properties":{"user_id":{"type":"string","title":"User Id"},"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label"}},"additionalProperties":false,"type":"object","required":["user_id","label"],"title":"AdminKey"},"AdminPassword":{"properties":{"new_password":{"type":"string","maxLength":256,"minLength":12,"title":"New Password"}},"type":"object","required":["new_password"],"title":"AdminPassword"},"Candidates":{"properties":{"candidates":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Candidates"},"top_k":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Top K","default":5}},"additionalProperties":false,"type":"object","required":["candidates"],"title":"Candidates"},"ChangeUser":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"platform_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform Role"},"reason":{"type":"string","maxLength":500,"minLength":3,"title":"Reason"}},"type":"object","required":["reason"],"title":"ChangeUser"},"ContactInput":{"properties":{"name":{"type":"string","maxLength":128,"minLength":2,"title":"Name"},"email":{"type":"string","maxLength":254,"minLength":3,"title":"Email"},"company":{"type":"string","maxLength":160,"title":"Company","default":""},"kind":{"type":"string","title":"Kind"},"message":{"type":"string","maxLength":4000,"minLength":10,"title":"Message"},"consent":{"type":"boolean","title":"Consent"},"website":{"type":"string","maxLength":200,"title":"Website","default":""}},"additionalProperties":false,"type":"object","required":["name","email","kind","message","consent"],"title":"ContactInput"},"EmailInput":{"properties":{"email":{"type":"string","maxLength":254,"minLength":3,"title":"Email"}},"type":"object","required":["email"],"title":"EmailInput"},"ExportInput":{"properties":{"password":{"type":"string","maxLength":256,"minLength":12,"title":"Password"}},"additionalProperties":false,"type":"object","required":["password"],"title":"ExportInput"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Handled":{"properties":{"handled":{"type":"boolean","title":"Handled"}},"additionalProperties":false,"type":"object","required":["handled"],"title":"Handled"},"KeyInput":{"properties":{"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label"}},"type":"object","required":["label"],"title":"KeyInput"},"LimitsInput":{"properties":{"derived":{"type":"string","title":"Derived"},"max_file_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max File Mb"},"queue_capacity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue Capacity"},"queue_storage_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue Storage Mb"},"max_pages":{"type":"integer","title":"Max Pages"},"max_characters":{"type":"integer","title":"Max Characters"},"query_queue_capacity":{"type":"integer","title":"Query Queue Capacity"}},"additionalProperties":false,"type":"object","required":["derived","max_pages","max_characters","query_queue_capacity"],"title":"LimitsInput"},"LinkInput":{"properties":{"link":{"type":"string","maxLength":512,"minLength":1,"title":"Link"}},"additionalProperties":false,"type":"object","required":["link"],"title":"LinkInput"},"Login":{"properties":{"email":{"type":"string","maxLength":254,"minLength":3,"title":"Email"},"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"}},"type":"object","required":["email","password"],"title":"Login"},"NewPackage":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"units":{"type":"integer","maximum":1000000000.0,"minimum":1.0,"title":"Units"},"active":{"type":"boolean","title":"Active","default":true},"price_minor":{"type":"integer","maximum":1000000000000.0,"minimum":0.0,"title":"Price Minor","default":0},"currency":{"type":"string","pattern":"^(USD|EUR|TRY|GBP)$","title":"Currency","default":"USD"},"sale_url":{"type":"string","maxLength":2048,"title":"Sale Url","default":""},"sort_order":{"anyOf":[{"type":"integer","maximum":1000000.0,"minimum":1.0},{"type":"null"}],"title":"Sort Order"},"package_id":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$","title":"Package Id"}},"additionalProperties":false,"type":"object","required":["name","units","package_id"],"title":"NewPackage"},"Package":{"properties":{"name":{"type":"string","maxLength":80,"minLength":1,"title":"Name"},"units":{"type":"integer","maximum":1000000000.0,"minimum":1.0,"title":"Units"},"active":{"type":"boolean","title":"Active","default":true},"price_minor":{"type":"integer","maximum":1000000000000.0,"minimum":0.0,"title":"Price Minor","default":0},"currency":{"type":"string","pattern":"^(USD|EUR|TRY|GBP)$","title":"Currency","default":"USD"},"sale_url":{"type":"string","maxLength":2048,"title":"Sale Url","default":""},"sort_order":{"anyOf":[{"type":"integer","maximum":1000000.0,"minimum":1.0},{"type":"null"}],"title":"Sort Order"}},"additionalProperties":false,"type":"object","required":["name","units"],"title":"Package"},"PasswordChange":{"properties":{"old_password":{"type":"string","maxLength":256,"minLength":1,"title":"Old Password"},"new_password":{"type":"string","maxLength":256,"minLength":12,"title":"New Password"}},"type":"object","required":["old_password","new_password"],"title":"PasswordChange"},"ReadInput":{"properties":{"query":{"type":"string","maxLength":10000,"minLength":1,"title":"Query"},"candidates":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Candidates"},"top_k":{"type":"integer","maximum":20.0,"minimum":1.0,"title":"Top K","default":5}},"additionalProperties":false,"type":"object","required":["query"],"title":"ReadInput"},"Registration":{"properties":{"email":{"type":"string","maxLength":254,"minLength":3,"title":"Email"},"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"},"name":{"type":"string","maxLength":128,"minLength":2,"title":"Name"}},"type":"object","required":["email","password","name"],"title":"Registration"},"Reset":{"properties":{"token":{"type":"string","maxLength":128,"minLength":1,"title":"Token"},"new_password":{"type":"string","maxLength":256,"minLength":12,"title":"New Password"},"purpose":{"type":"string","title":"Purpose","default":"reset"}},"type":"object","required":["token","new_password"],"title":"Reset"},"ResourceInput":{"properties":{"cpus":{"type":"integer","maximum":256.0,"minimum":2.0,"title":"Cpus"}},"additionalProperties":false,"type":"object","required":["cpus"],"title":"ResourceInput"},"Restore":{"properties":{"upload_id":{"type":"string","pattern":"^[a-f0-9]{32}$","title":"Upload Id"},"password":{"type":"string","maxLength":256,"minLength":1,"title":"Password"},"confirmation":{"type":"string","title":"Confirmation"},"reason":{"type":"string","maxLength":500,"minLength":3,"title":"Reason"}},"additionalProperties":false,"type":"object","required":["upload_id","password","confirmation","reason"],"title":"Restore"},"Review":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":3,"title":"Reason"}},"type":"object","required":["reason"],"title":"Review"},"SMTPInput":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"host":{"type":"string","maxLength":253,"title":"Host","default":""},"port":{"type":"integer","maximum":65535.0,"minimum":1.0,"title":"Port","default":587},"security":{"type":"string","pattern":"^(ssl|starttls)$","title":"Security","default":"starttls"},"from_email":{"type":"string","maxLength":254,"title":"From Email","default":""},"from_name":{"type":"string","maxLength":128,"title":"From Name","default":"Pappur"},"username":{"type":"string","maxLength":254,"title":"Username","default":""},"password":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Password"},"clear_password":{"type":"boolean","title":"Clear Password","default":false}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"SMTPInput"},"TestEmail":{"properties":{"to":{"type":"string","maxLength":254,"minLength":3,"title":"To"}},"additionalProperties":false,"type":"object","required":["to"],"title":"TestEmail"},"TokenInput":{"properties":{"token":{"type":"string","maxLength":128,"minLength":1,"title":"Token"}},"type":"object","required":["token"],"title":"TokenInput"},"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"},"WebhookInput":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"WebhookInput"},"WorkspaceInput":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"}},"type":"object","required":["workspace_id"],"title":"WorkspaceInput"},"Error":{"type":"object","properties":{"detail":{"type":"string"}},"required":["detail"]},"PreparedItem":{"type":"object","properties":{"item_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"text":{"type":"string","minLength":1},"metadata":{"type":"object","additionalProperties":true},"source":{"type":"object","additionalProperties":true}},"required":["text"]},"EmbeddingInput":{"oneOf":[{"type":"object","properties":{"text":{"type":"string"}},"required":["text"]},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PreparedItem"}}},"required":["items"]},{"type":"string"}]},"VectorItem":{"type":"object","properties":{"item_id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"text":{"type":"string"},"representation":{"type":"string","enum":["text","image"]},"source":{"type":"object","additionalProperties":true},"metadata":{"type":"object","additionalProperties":true},"token_count":{"type":"integer"},"embedding":{"type":"array","items":{"type":"number"},"minItems":2048,"maxItems":2048},"embedding_space":{"type":"string","const":"pappur:qwen3-vl-embedding-2b:q8_0:6a1b92741466:b11240:prompt-v1:2048"}},"required":["item_id","source","embedding","embedding_space"],"additionalProperties":true},"Job":{"type":"object","properties":{"job_id":{"type":"string"},"mode":{"type":"string","enum":["embed","read"]},"filename":{"type":"string"},"status":{"type":"string","enum":["uploading","queued","running","success","failed","cancelled"]},"stage":{"type":"string"},"completed":{"type":"integer"},"total":{"type":"integer"},"duration":{"type":"number"},"peak_memory_mb":{"type":"number"},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"number"},{"type":"null"}]},"busy":{"type":"boolean"},"api_key_id":{"type":"string"},"billing":{"anyOf":[{"$ref":"#/components/schemas/Billing"},{"type":"null"}]}},"required":["job_id","mode","filename","status","stage","error","expires_at"]},"Usage":{"type":"object","properties":{"pages":{"anyOf":[{"type":"integer"},{"type":"null"}]},"items":{"type":"integer"},"source_tokens":{"type":"integer"},"embedding_input_tokens":{"type":"integer"},"read_queries":{"type":"integer"}},"required":["pages","items","source_tokens","embedding_input_tokens"]},"Result":{"type":"object","properties":{"schema_version":{"type":"string","const":"2.0"},"filename":{"type":"string"},"mode":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/VectorItem"}},"warnings":{"type":"array","items":{"type":"string"}},"page_count":{"anyOf":[{"type":"integer"},{"type":"null"}]},"model":{"type":"string"},"embedding_dimension":{"type":"integer","const":2048},"embedding_space":{"type":"string","const":"pappur:qwen3-vl-embedding-2b:q8_0:6a1b92741466:b11240:prompt-v1:2048"},"usage":{"$ref":"#/components/schemas/Usage"},"metrics":{"type":"object","properties":{"processing_time_sec":{"type":"number"},"peak_memory_mb":{"type":"number"}},"required":["processing_time_sec","peak_memory_mb"]},"exports":{"type":"array","items":{"type":"string"}},"billing":{"$ref":"#/components/schemas/Billing"},"query_embedding":{"type":"array","items":{"type":"number"},"minItems":2048,"maxItems":2048},"query_token_count":{"type":"integer"},"matches":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["schema_version","filename","mode","embedding_space","usage","metrics","exports"]},"Billing":{"type":"object","properties":{"pricing_version":{"type":"string"},"page_units":{"type":"integer"},"total_tokens":{"type":"integer"},"tokens_charged":{"type":"integer"},"unlimited":{"type":"boolean"}},"required":["pricing_version","page_units","total_tokens","tokens_charged","unlimited"]}},"securitySchemes":{"PappurKey":{"type":"http","scheme":"bearer","description":"Workspace API key issued through the Pappur UI. Keep this secret in the caller environment."}}}}