AI
Entry point for the Elide AI inference API.
Provides model loading, lifecycle management, and multi-model
orchestration. Accessible via the elide.ai namespace.
elide.AI
Support: Experimental
Since: 1.1.0
Docs: Elide Docs
3 members: 3 undocumented
Methods
Enum AIModelStatus
Lifecycle status of a loaded model.
Since: 1.1.0| Value | Description |
|---|---|
loading | |
ready | |
unloaded | |
error |
Enum AIRole
Role of a message participant.
Since: 1.1.0| Value | Description |
|---|---|
system | |
user | |
assistant | |
tool |
Enum AIFinishReason
Reason the model stopped generating.
Since: 1.1.0| Value | Description |
|---|---|
stop | |
length | |
tool_calls | |
content_filter | |
error |
Enum AIContentType
Type of a content block within a message.
Since: 1.1.0| Value | Description |
|---|---|
text | |
image_url | |
image_base64 | |
audio_url | |
audio_base64 | |
tool_use | |
tool_result | |
thinking |
Enum AIResponseFormat
Format of the model response.
Since: 1.1.0| Value | Description |
|---|---|
text | |
json_object | |
json_schema |
Enum AIConstraintType
Constraint type for guided generation.
Since: 1.1.0| Value | Description |
|---|---|
none | |
json_schema | |
regex | |
grammar |
Enum AIQuantization
Weight quantization level for model loading.
Since: 1.1.0| Value | Description |
|---|---|
none | |
q2 | |
q3 | |
q4 | |
q5 | |
q6 | |
q8 | |
f16 | |
bf16 | |
auto |
Enum AIDevice
Compute device for model execution.
Since: 1.1.0| Value | Description |
|---|---|
auto | |
cpu | |
cuda | |
metal |
Enum AIToolChoiceMode
Tool choice strategy.
Since: 1.1.0| Value | Description |
|---|---|
none | |
auto | |
required |
Enum AIImageDetail
Image detail level for vision models.
Since: 1.1.0| Value | Description |
|---|---|
auto | |
low | |
high |
Enum AIModelCategory
Category of model architecture.
Since: 1.1.0| Value | Description |
|---|---|
text | |
vision | |
embedding | |
diffusion | |
speech |
Dictionary AIContentPart
A block of content within a message. Supports text, images, audio, tool use, and chain-of-thought reasoning.
Follows the Anthropic content-block pattern:{ type: "text", text: "Hello" }
{ type: "image_url", imageUrl: { url: "https:<<>>
{ type: " image_base64", imageBase64: { mediaType: "image/png", data: "..." } }
{ type: "thinking", thinking: "Let me reason about this..." }8 members: 2 supported, 6 undocumented
Properties
---
Dictionary AIImageUrl
Image URL reference (when type = "image_url").
Properties
---
Dictionary AIImageBase64
Base64-encoded image data (when type = "image_base64").
2 members: 1 supported, 1 undocumented
Properties
---
Dictionary AIAudioUrl
Audio URL reference (when type = "audio_url").
Properties
---
Dictionary AIAudioBase64
Base64-encoded audio data (when type = "audio_base64").
2 members: 1 supported, 1 undocumented
Properties
---
Dictionary AIToolUse
Tool use request from the model (when type = "tool_use").
3 members: 2 supported, 1 undocumented
Properties
---
Dictionary AIToolResult
Tool result provided by the caller (when type = "tool_result").
3 members: 1 supported, 2 undocumented
Properties
---
Dictionary AIMessage
A single message in a conversation. Content can be either a plain string (shorthand for a single text block) or an array of content blocks for multimodal inputs.
// Simple text
{ role: "user", content: "Hello!" }
// Multimodal (Anthropic-style)
{ role: "user", content: [
{ type: "text", text: "What's in this image?" },
{ type: "image_url", imageUrl: { url: "https://example.com/cat.jpg" } }
]}3 members: 2 supported, 1 undocumented
Properties
---
Dictionary AITool
Description of a tool the model may invoke.
Since: 1.1.03 members: 2 supported, 1 undocumented
Properties
---
Dictionary AIToolChoice
Tool selection strategy. Either a mode string or a specific tool name.
toolChoice: "auto"
toolChoice: { mode: "required" }
toolChoice: { name: "get_weather" }2 members: 1 supported, 1 undocumented
Properties
---
Dictionary AIConstraint
Constraint for guided / structured generation.
Since: 1.1.04 members: 1 supported, 3 undocumented
Properties
---
Dictionary AISamplingOptions
Sampling parameters that control token generation.
Since: 1.1.010 members: 3 supported, 7 undocumented
Properties
---
Dictionary AIGenerateOptions
Options for a generation request.
Extends: AISamplingOptions Since: 1.1.011 members: 11 undocumented
Properties
---
Dictionary AIEmbeddingOptions
Options for computing embeddings.
Since: 1.1.0Properties
---
Dictionary AIModelOptions
Options for loading a model.
Since: 1.1.08 members: 8 undocumented
Properties
---
Dictionary AIAdapterConfig
LoRA adapter paths to pre-load.
3 members: 2 supported, 1 undocumented
Properties
---
Dictionary AICompletion
A complete model response (one or more choices).
Since: 1.1.04 members: 2 supported, 2 undocumented
Properties
---
Dictionary AIChoice
A complete model response (one or more choices).
Since: 1.1.04 members: 2 supported, 2 undocumented
Properties
---
Dictionary AIResponseMessage
A single completion choice.
Since: 1.1.04 members: 1 supported, 3 undocumented
Properties
---
Dictionary AITokenLogprob
3 members: 1 supported, 2 undocumented
Properties
---
Dictionary AITopLogprob
2 members: 1 supported, 1 undocumented
Properties
---
Dictionary AICompletionChunk
A single chunk in a streaming response.
Since: 1.1.03 members: 2 supported, 1 undocumented
Properties
---
Dictionary AIChunkChoice
A single chunk in a streaming response.
Since: 1.1.03 members: 2 supported, 1 undocumented
Properties
---
Dictionary AIChunkDelta
A streaming choice delta.
Since: 1.1.04 members: 1 supported, 3 undocumented
Properties
---
Dictionary AIUsage
6 members: 2 supported, 4 undocumented
Properties
---
Dictionary AIImageGenerateOptions
Options for image generation via diffusion models.
Since: 1.1.05 members: 1 supported, 4 undocumented
Properties
---
Dictionary AIGeneratedImage
Result of an image generation request.
Since: 1.1.04 members: 2 supported, 2 undocumented
Properties
---
Dictionary AISpeechOptions
Options for speech synthesis.
Since: 1.1.0Properties
---
Dictionary AIGeneratedSpeech
Result of a speech synthesis request.
Since: 1.1.03 members: 1 supported, 2 undocumented
Properties
---
Dictionary AIModelInfo
Metadata about a loaded model.
Since: 1.1.06 members: 1 supported, 5 undocumented
Properties
---
Interface AIModel
Load a model by HuggingFace identifier or local path.
Supports text, vision, embedding, diffusion, and speech models. The model category is auto-detected from the model config unless explicitly specified in options.
10 members: 1 supported, 9 undocumented
Methods
Properties
---