Functional API#

All functions below resolve the API key automatically when api_key is omitted.

saia_python.list_models(*, api_key: str | None = None, base_url: str | None = None) list[dict][source]#

List all available models (functional API).

saia_python.list_model_ids(*, api_key: str | None = None, base_url: str | None = None) list[str][source]#

List model ID strings (functional API).

saia_python.chat_completion(model: str, messages: list[dict], *, api_key: str | None = None, base_url: str | None = None, **kwargs) dict | SSEStream[source]#

Send a chat completion request (functional API).

See ChatService.completions() for full parameter docs. With stream=True this returns an iterable SSEStream instead of a dict.

saia_python.transcribe(file_path: str, *, api_key: str | None = None, base_url: str | None = None, **kwargs) str | Future[str][source]#

Transcribe an audio file (functional API).

See VoiceService.transcribe() for full parameter docs. Passing wait=False returns a concurrent.futures.Future instead of the transcription string.

saia_python.translate(file_path: str, *, api_key: str | None = None, base_url: str | None = None, **kwargs) str | Future[str][source]#

Translate an audio file to English (functional API).

See VoiceService.translate() for full parameter docs. Passing wait=False returns a concurrent.futures.Future instead of the translation string.

saia_python.list_arcanas(*, api_key: str | None = None, base_url: str | None = None) list[dict][source]#

List all arcanas (functional API).

saia_python.get_arcana(name: str, *, api_key: str | None = None, base_url: str | None = None) dict[source]#

Get a specific arcana by name (functional API).

saia_python.upload_to_arcana(name: str, file_path: str, *, api_key: str | None = None, base_url: str | None = None) dict | None[source]#

Upload a file to an arcana (functional API).

saia_python.arcana_chat(model: str, messages: list[dict], arcana_id: str, *, api_key: str | None = None, base_url: str | None = None, **kwargs) dict | SSEStream[source]#

Chat with RAG context from an arcana (functional API).

With stream=True this returns an iterable SSEStream instead of a dict.

saia_python.get_rate_limits(*, api_key: str | None = None, base_url: str | None = None) RateLimitInfo[source]#

Fetch current rate-limit status (functional API).

saia_python.convert_document(file_path: str, *, response_type: str = 'markdown', api_key: str | None = None, base_url: str | None = None, **kwargs) ConversionResult[source]#

Convert a document using the Docling service (functional API).

See DocumentService.convert() for full parameter docs.