Quickstart
Five minutes from zero credentials to a downloaded DOCX. Pick your language.
1. Get credentials#
ScaiScribe authenticates through ScaiKey. You need a client_id and client_secret from your tenant's ScaiKey admin. If you don't have them yet, ask whoever runs your tenant's ScaiKey to register a service-to-service application and share the credentials.
Once you have them, export:
1 2 3 4 | |
ScaiKey service tokens (the default —
ScaiKeyAuth) are issued globally and carry notenant_idclaim. ScaiScribe needs to know which tenant a document belongs to, so the SDK sendsX-ScaiScribe-Tenant-Idon every request when you passdefault_tenant_id(Python) /defaultTenantId(TS / .NET). Skip this knob when using a user-bound token (e.g. OIDC viaBearerAuth) — those carry the tenant in the JWT already.
2. Install the SDK#
::: tabs
Python#
1 | |
TypeScript#
1 | |
.NET#
1 | |
:::
3. Build a document#
::: tabs
Python#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | |
TypeScript#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
.NET#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | |
curl#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | |
:::
4. Download the artefact#
Each RenderArtefact carries a presigned download_url valid for ~1 hour. Stream it:
1 2 3 4 5 | |
What you just did#
- Authenticated to ScaiKey via OAuth
client_credentials(the SDK did this transparently). - Created a draft document — server-side resource that holds the spec under construction.
- Added two elements (heading + paragraph). The PATCH endpoint applies a list of
add_element/edit_element/delete_element/move_elementoperations atomically. - Finalised — the server queued render jobs across all requested formats, waited for them to complete (default 15s timeout), and returned the artefacts with presigned download URLs.
Most steps that look async (queue + job + result) are sync-wrapped under the hood — the SDK hides the 202+poll pattern unless you pass sync=False.
Next#
- Themes and styling — see Concepts → Themes.
- Template-based generation — register a
.docxwith placeholders, fill it with structured data: Tutorials → Templates. - AI agents — the MCP surface mirrors every operation: Reference → MCP.