أساس · التوثيق
مرجع الواجهة

API reference

Every ASAS v1 endpoint — methods, auth scopes, request and response schemas.

مرجع الواجهة البرمجية

مرجع كامل لنقاط النهاية في الإصدار الأول. المواصفة القابلة للقراءة آلياً بصيغة OpenAPI 3.1 متاحة للتنزيل واستيرادها في أدواتك.

This reference is generated from the same Zod contracts the gateway and SDK use. Download the machine-readable spec to import into Postman, Insomnia, or your codegen tool:

An interactive, try-it reference (rendered by fumadocs-openapi from this same openapi.json) is a fast-follow. The wiring is scaffolded — see the docs app README. Until then, this page is the hand-maintained mirror of the spec.

Base URLhttps://api.asas.flitc.tech/v1 · AuthAuthorization: Bearer asas_live_… · Errors — RFC 9457 application/problem+json (see Errors).


POST /v1/tts

Synthesize speech and return the full clip (blocking). Scope: tts:speak.

Requestapplication/json (TtsRequest)

{ "voice": "layan", "text": "أهلاً بك في أساس", "speed": 1.0, "quality": "standard" }

Responses

StatusBody
200audio/mpeg or audio/wav (binary)
422text over 500 chars / validation
401 403 429 5xxproblem+json

POST /v1/tts/stream

Same body as /v1/tts, but streams chunked audio for low-latency playback. Scope: tts:speak. 200 → chunked audio/mpeg.

POST /v1/stt/transcriptions

Transcribe audio. Scope: stt:transcribe. Request is multipart/form-data.

FieldTypeNotes
filefileRequired. WAV/MP3/M4A
languagestringDefault auto
diarizebooleanDefault false
word_timestampsbooleanDefault false

Responses200 synchronous transcription (short audio) · 202 async job (long audio; result via the job.completed webhook) · errors as problem+json.

POST /v1/rag/search

Search your document tenant. Scope: rag:query. Request is application/json (RagSearchRequest).

{ "query": "ما هي مدة الإجازة السنوية؟", "mode": "answer", "top_k": 8 }

Responses200 complete JSON result · 409 tenant not provisioned / resuming · errors as problem+json.


Schemas

TtsRequest

FieldTypeConstraints
textstringrequired, 1–500 chars
voicestringrequired
speednumber0.5–2.0, default 1.0
qualityenumfast | standard | high, default standard

RagSearchRequest

FieldTypeConstraints
querystringrequired
modeenumretrieve | answer | analyze, default retrieve
top_kinteger1–100, default 10
min_scorenumber0–1, optional
detailenumminimal | full, default full
document_idsstring[]optional
languagestringauto / none / ISO-639-1
metadata_filtersobjectoptional
enable_rewrite_search_querybooleandefault false (requires rewrite_search_query_instructions)

Problem (error envelope)

FieldTypeNotes
statusintegerHTTP status
titlestringshort summary
detailstringoccurrence specifics (optional)
codestringstable machine-readable code
request_idstringtrace id

See the full component schemas — including STT realtime and webhook payloads — in the downloadable openapi.json.

On this page