Models
Create a Model
Creates a new custom model for the workspace. Provider credentials in the configuration are encrypted using the workspace encryption key before being persisted.import orq_ai_sdk
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY"),
) as orq:
res = orq.models.create(configuration={
}, display_name="Custom Model", has_functions=False, id="<id>", input_cost=2127.52, metadata=orq_ai_sdk.ModelMetadata(
is_private=False,
), model_developer="<value>", model_family="<value>", model_id="<id>", model_type="<value>", output_cost=5446, parameters=[
{
"config": {
},
"name": "<value>",
"parameter": "<value>",
"parameter_type": "<value>",
},
], provider="<value>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.models.create({
configuration: {
},
displayName: "Custom Model",
hasFunctions: false,
id: "<id>",
inputCost: 2127.52,
metadata: {
isPrivate: false,
},
modelDeveloper: "<value>",
modelFamily: "<value>",
modelId: "<id>",
modelType: "<value>",
outputCost: 5446,
parameters: [
{
config: {
},
name: "<value>",
parameter: "<value>",
parameterType: "<value>",
},
],
provider: "<value>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"configuration": Dict[str, Any], # required
"display_name": str, # required
"has_functions": bool, # required
"id": str, # required
"input_cost": float, # required
"metadata": { # required
"allowed_passthrough_parameters": List[str], # optional
"autorouter": { # optional
"benchmark_model": Optional[str],
"economical_model": Optional[str],
"id": Optional[str],
"models": List[str], # optional
"profile": Optional[str],
"session_affinity": { # optional
"enabled": bool, # required
"ttl_seconds": Optional[int],
},
"strong_model": Optional[str],
"v2": { # optional
"aa_creator": { # optional
"id": str, # required
"name": str, # required
"slug": Optional[str],
},
"aa_evaluations": Dict[str, Nullable[float]], # optional
"aa_index_is_estimated": Optional[bool],
"aa_index_version": Optional[str],
"aa_is_reasoning": Optional[bool],
"aa_median_output_tokens_per_second": Optional[float],
"aa_median_time_to_first_answer_token": Optional[float],
"aa_median_time_to_first_token_seconds": Optional[float],
"aa_model_id": Optional[str],
"aa_name": Optional[str],
"aa_pricing": Dict[str, Nullable[float]], # optional
"aa_reasoning_effort": Optional[str],
"aa_release_date": Optional[str],
"aa_slug": Optional[str],
"default_effort": Optional[str],
"default_effort_scored": Optional[bool],
"intelligence_index": float, # required
"price": float, # required
"reasoning_efforts": Dict[str, AutoRouterV2EffortConfig], # optional
},
"version": Optional[str],
},
"batch_endpoints": List[str], # optional
"cached_image_input_cost": Optional[float],
"cached_input_cost": Optional[float],
"chain_of_thought": Optional[bool],
"context_length": Optional[int],
"context_window": Optional[int],
"cost_efficiency_rating": Optional[int],
"cost_per_image": Optional[float],
"default_max_output_tokens": Optional[int],
"default_speech_response_format": Optional[str],
"deprecation_date": Optional[str],
"embedding_dimensions": Optional[int],
"extended_context_pricing_mode": Optional[str],
"extended_context_threshold": Optional[int],
"function_tools_require_effort_none": Optional[bool],
"fusion": { # optional
"feed_raw_to_synth": bool, # required
"id": Optional[str],
"judge_model": str, # required
"max_tool_calls": int, # required
"orchestrator_model": Optional[str],
"panel_models": List[str], # required
"preset": str, # required
"synthesis_mode": str, # required
"web_tools": bool, # required
},
"generate_audio": Optional[bool],
"image_input_cost": Optional[float],
"image_output_cost": Optional[float],
"image_token_cost": Optional[float],
"intelligence_rating": Optional[int],
"is_private": bool, # required
"is_realtime": Optional[bool],
"knowledge_cutoff": Optional[str],
"max_images_per_request": Optional[int],
"max_input_tokens": Optional[int],
"max_output_tokens": Optional[int],
"max_temperature": Optional[float],
"million_fetches_cost": Optional[float],
"million_searches_cost": Optional[float],
"million_tokens_above_128k_cache_read_cost": Optional[float],
"million_tokens_above_128k_cache_write_cost": Optional[float],
"million_tokens_above_128k_input_cost": Optional[float],
"million_tokens_above_128k_output_cost": Optional[float],
"million_tokens_above_200k_cache_read_cost": Optional[float],
"million_tokens_above_200k_cache_write_cost": Optional[float],
"million_tokens_above_200k_input_cost": Optional[float],
"million_tokens_above_200k_output_cost": Optional[float],
"million_tokens_audio_input_cost": Optional[float],
"million_tokens_audio_output_cost": Optional[float],
"million_tokens_batches_input_cost": Optional[float],
"million_tokens_batches_output_cost": Optional[float],
"million_tokens_cache_read_cost": Optional[float],
"million_tokens_cache_write_1h_cost": Optional[float],
"million_tokens_cache_write_5m_cost": Optional[float],
"million_tokens_cache_write_cost": Optional[float],
"million_tokens_input_cost": Optional[float],
"million_tokens_output_cost": Optional[float],
"million_tokens_reasoning_cost": Optional[float],
"multilingual": Optional[bool],
"offline": Optional[bool],
"per_video_second_cost": Optional[float],
"per_video_second_cost_1080p": Optional[float],
"pricing": { # optional
"audio_input": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"audio_output": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"audio_session": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"cache_read": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"cache_write_12h": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"cache_write_1h": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"cache_write_30m": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"cache_write_5m": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"fetch": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"image_cache_read": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"image_input": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"input": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"output": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"reasoning": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"search": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"text_input": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"variants": [{ # optional
"audio_input": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"audio_output": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"audio_session": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"cache_read": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"cache_write_12h": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"cache_write_1h": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"cache_write_30m": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"cache_write_5m": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"fetch": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"image_cache_read": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"image_input": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"input": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"output": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"reasoning": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"search": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"text_input": { # optional
"cost": float, # required
"currency": str, # required
"per": int, # required
"unit": str, # required
},
"when": str, # required
}],
},
"reasoning_cost": Optional[float],
"reasoning_tokens": Optional[int],
"region": Optional[str],
"speed_rating": Optional[int],
"supported_embedding_dimensions": { # optional
"max": Optional[int],
"min": Optional[int],
},
"supported_video_aspect_ratios": List[str], # optional
"supported_video_durations": List[int], # optional
"supported_video_frame_images": List[str], # optional
"supported_video_resolutions": List[str], # optional
"supported_video_sizes": List[str], # optional
"supports_adaptive_reasoning": Optional[bool],
"supports_audio_input": Optional[bool],
"supports_audio_output": Optional[bool],
"supports_b64_json_response_format": Optional[bool],
"supports_batch_api": Optional[bool],
"supports_cache_control": Optional[bool],
"supports_citations": Optional[bool],
"supports_classify": Optional[bool],
"supports_code_execution": Optional[bool],
"supports_commercial_use": Optional[bool],
"supports_computer_use": Optional[bool],
"supports_developer_message": Optional[bool],
"supports_direct_cost": Optional[bool],
"supports_distillation": Optional[bool],
"supports_extended_thinking": Optional[bool],
"supports_fine_tuning": Optional[bool],
"supports_google_realtime_api": Optional[bool],
"supports_image_edit": Optional[bool],
"supports_image_input": Optional[bool],
"supports_image_output": Optional[bool],
"supports_images": Optional[bool],
"supports_json_mode_response_format": Optional[bool],
"supports_json_schema_response_format": Optional[bool],
"supports_max_completion_tokens": Optional[bool],
"supports_mid_conversation_system": Optional[bool],
"supports_native_classify": Optional[bool],
"supports_openai_realtime_api": Optional[bool],
"supports_openai_sdk": Optional[bool],
"supports_parallel_tool_calls": Optional[bool],
"supports_pdf_input": Optional[bool],
"supports_prompt_caching": Optional[bool],
"supports_reasoning": Optional[bool],
"supports_reasoning_effort_default": Optional[bool],
"supports_reasoning_effort_high": Optional[bool],
"supports_reasoning_effort_instant": Optional[bool],
"supports_reasoning_effort_low": Optional[bool],
"supports_reasoning_effort_max": Optional[bool],
"supports_reasoning_effort_medium": Optional[bool],
"supports_reasoning_effort_minimal": Optional[bool],
"supports_reasoning_effort_none": Optional[bool],
"supports_reasoning_effort_xhigh": Optional[bool],
"supports_responses_api": Optional[bool],
"supports_sampling_params": Optional[bool],
"supports_service_tier": Optional[bool],
"supports_streaming": Optional[bool],
"supports_strict_tool": Optional[bool],
"supports_structured_outputs": Optional[bool],
"supports_system_message": Optional[bool],
"supports_text": Optional[bool],
"supports_text_input": Optional[bool],
"supports_text_output": Optional[bool],
"supports_thinking_level": Optional[bool],
"supports_thinking_level_low": Optional[bool],
"supports_thinking_level_medium": Optional[bool],
"supports_thinking_level_minimal": Optional[bool],
"supports_tool_calling": Optional[bool],
"supports_tool_choice": Optional[bool],
"supports_transcription": Optional[bool],
"supports_url_context": Optional[bool],
"supports_url_response_format": Optional[bool],
"supports_video_input": Optional[bool],
"supports_video_output": Optional[bool],
"supports_video_seed": Optional[bool],
"supports_vision": Optional[bool],
"supports_web_search": Optional[bool],
"supports_zdr": Optional[bool],
"thinking_enforced": Optional[bool],
},
"model_developer": str, # required
"model_family": str, # required
"model_id": str, # required
"model_type": str, # required
"output_cost": float, # required
"parameters": [{ # required
"config": Dict[str, Any], # required
"description": Optional[str],
"hints": Optional[str],
"name": str, # required
"parameter": str, # required
"parameter_type": str, # required
"position": Optional[int],
}],
"provider": str, # required
"benchmark_model": Optional[str],
}
{
benchmarkModel?: string;
configuration: Record<string, any>; // required
displayName: string; // required
hasFunctions: boolean; // required
id: string; // required
inputCost: number; // required
metadata: { // required
allowedPassthroughParameters?: string[];
autorouter?: {
benchmarkModel?: string;
economicalModel?: string;
id?: string;
models?: string[];
profile?: string;
sessionAffinity?: {
enabled: boolean; // required
ttlSeconds?: number;
};
strongModel?: string;
v2?: {
aaCreator?: {
id: string; // required
name: string; // required
slug?: string;
};
aaEvaluations?: Record<string, number>;
aaIndexIsEstimated?: boolean;
aaIndexVersion?: string;
aaIsReasoning?: boolean;
aaMedianOutputTokensPerSecond?: number;
aaMedianTimeToFirstAnswerToken?: number;
aaMedianTimeToFirstTokenSeconds?: number;
aaModelId?: string;
aaName?: string;
aaPricing?: Record<string, number>;
aaReasoningEffort?: string;
aaReleaseDate?: string;
aaSlug?: string;
defaultEffort?: string;
defaultEffortScored?: boolean;
intelligenceIndex: number; // required
price: number; // required
reasoningEfforts?: Record<string, AutoRouterV2EffortConfig>;
};
version?: string;
};
batchEndpoints?: string[];
cachedImageInputCost?: number;
cachedInputCost?: number;
chainOfThought?: boolean;
contextLength?: number;
contextWindow?: number;
costEfficiencyRating?: number;
costPerImage?: number;
defaultMaxOutputTokens?: number;
defaultSpeechResponseFormat?: string;
deprecationDate?: string;
embeddingDimensions?: number;
extendedContextPricingMode?: string;
extendedContextThreshold?: number;
functionToolsRequireEffortNone?: boolean;
fusion?: {
feedRawToSynth: boolean; // required
id?: string;
judgeModel: string; // required
maxToolCalls: number; // required
orchestratorModel?: string;
panelModels: string[]; // required
preset: string; // required
synthesisMode: string; // required
webTools: boolean; // required
};
generateAudio?: boolean;
imageInputCost?: number;
imageOutputCost?: number;
imageTokenCost?: number;
intelligenceRating?: number;
isPrivate: boolean; // required
isRealtime?: boolean;
knowledgeCutoff?: string;
maxImagesPerRequest?: number;
maxInputTokens?: number;
maxOutputTokens?: number;
maxTemperature?: number;
millionFetchesCost?: number;
millionSearchesCost?: number;
millionTokensAbove128kCacheReadCost?: number;
millionTokensAbove128kCacheWriteCost?: number;
millionTokensAbove128kInputCost?: number;
millionTokensAbove128kOutputCost?: number;
millionTokensAbove200kCacheReadCost?: number;
millionTokensAbove200kCacheWriteCost?: number;
millionTokensAbove200kInputCost?: number;
millionTokensAbove200kOutputCost?: number;
millionTokensAudioInputCost?: number;
millionTokensAudioOutputCost?: number;
millionTokensBatchesInputCost?: number;
millionTokensBatchesOutputCost?: number;
millionTokensCacheReadCost?: number;
millionTokensCacheWrite1hCost?: number;
millionTokensCacheWrite5mCost?: number;
millionTokensCacheWriteCost?: number;
millionTokensInputCost?: number;
millionTokensOutputCost?: number;
millionTokensReasoningCost?: number;
multilingual?: boolean;
offline?: boolean;
perVideoSecondCost?: number;
perVideoSecondCost1080p?: number;
pricing?: {
audioInput?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
audioOutput?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
audioSession?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
cacheRead?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
cacheWrite12h?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
cacheWrite1h?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
cacheWrite30m?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
cacheWrite5m?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
fetch?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
imageCacheRead?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
imageInput?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
input?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
output?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
reasoning?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
search?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
textInput?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
variants?: {
audioInput?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
audioOutput?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
audioSession?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
cacheRead?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
cacheWrite12h?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
cacheWrite1h?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
cacheWrite30m?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
cacheWrite5m?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
fetch?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
imageCacheRead?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
imageInput?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
input?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
output?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
reasoning?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
search?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
textInput?: {
cost: number; // required
currency: string; // required
per: number; // required
unit: string; // required
};
when: string; // required
}[];
};
reasoningCost?: number;
reasoningTokens?: number;
region?: string;
speedRating?: number;
supportedEmbeddingDimensions?: {
max?: number;
min?: number;
};
supportedVideoAspectRatios?: string[];
supportedVideoDurations?: number[];
supportedVideoFrameImages?: string[];
supportedVideoResolutions?: string[];
supportedVideoSizes?: string[];
supportsAdaptiveReasoning?: boolean;
supportsAudioInput?: boolean;
supportsAudioOutput?: boolean;
supportsB64JsonResponseFormat?: boolean;
supportsBatchApi?: boolean;
supportsCacheControl?: boolean;
supportsCitations?: boolean;
supportsClassify?: boolean;
supportsCodeExecution?: boolean;
supportsCommercialUse?: boolean;
supportsComputerUse?: boolean;
supportsDeveloperMessage?: boolean;
supportsDirectCost?: boolean;
supportsDistillation?: boolean;
supportsExtendedThinking?: boolean;
supportsFineTuning?: boolean;
supportsGoogleRealtimeApi?: boolean;
supportsImageEdit?: boolean;
supportsImageInput?: boolean;
supportsImageOutput?: boolean;
supportsImages?: boolean;
supportsJsonModeResponseFormat?: boolean;
supportsJsonSchemaResponseFormat?: boolean;
supportsMaxCompletionTokens?: boolean;
supportsMidConversationSystem?: boolean;
supportsNativeClassify?: boolean;
supportsOpenaiRealtimeApi?: boolean;
supportsOpenaiSDK?: boolean;
supportsParallelToolCalls?: boolean;
supportsPdfInput?: boolean;
supportsPromptCaching?: boolean;
supportsReasoning?: boolean;
supportsReasoningEffortDefault?: boolean;
supportsReasoningEffortHigh?: boolean;
supportsReasoningEffortInstant?: boolean;
supportsReasoningEffortLow?: boolean;
supportsReasoningEffortMax?: boolean;
supportsReasoningEffortMedium?: boolean;
supportsReasoningEffortMinimal?: boolean;
supportsReasoningEffortNone?: boolean;
supportsReasoningEffortXhigh?: boolean;
supportsResponsesApi?: boolean;
supportsSamplingParams?: boolean;
supportsServiceTier?: boolean;
supportsStreaming?: boolean;
supportsStrictTool?: boolean;
supportsStructuredOutputs?: boolean;
supportsSystemMessage?: boolean;
supportsText?: boolean;
supportsTextInput?: boolean;
supportsTextOutput?: boolean;
supportsThinkingLevel?: boolean;
supportsThinkingLevelLow?: boolean;
supportsThinkingLevelMedium?: boolean;
supportsThinkingLevelMinimal?: boolean;
supportsToolCalling?: boolean;
supportsToolChoice?: boolean;
supportsTranscription?: boolean;
supportsUrlContext?: boolean;
supportsUrlResponseFormat?: boolean;
supportsVideoInput?: boolean;
supportsVideoOutput?: boolean;
supportsVideoSeed?: boolean;
supportsVision?: boolean;
supportsWebSearch?: boolean;
supportsZdr?: boolean;
thinkingEnforced?: boolean;
};
modelDeveloper: string; // required
modelFamily: string; // required
modelId: string; // required
modelType: string; // required
outputCost: number; // required
parameters: { // required
config: Record<string, any>; // required
description?: string;
hints?: string;
name: string; // required
parameter: string; // required
parameterType: string; // required
position?: number;
}[];
provider: string; // required
}
Show Response
Show Response
{
"configuration": {
"api_key_env": Optional[str],
"api_version": Optional[str],
"auth_mode": Optional[str],
"auth_type": Optional[str],
"base_url": Optional[str],
"deployment_name": Optional[str],
"endpoint": Optional[str],
"inference_profile_arn": Optional[str],
"integration_id": Optional[str],
"is_openai_compatible": Optional[bool],
"is_tuned_model": Optional[bool],
"location": Optional[str],
"model_id": Optional[str],
"project_id": Optional[str],
"provider": str,
"region": Optional[str],
"should_use_beta_features": Optional[bool],
"subtype": Optional[str],
"workspace_id": Optional[str],
},
"created": str,
"description": Nullable[str],
"display_name": str,
"docs_url": Nullable[str],
"enabled": bool,
"enabled_for_endpoints": bool,
"enabled_for_playground": bool,
"has_cpu_pricing": bool,
"has_functions": bool,
"id": str,
"input_cost": Nullable[float],
"input_currency": str,
"is_active": bool,
"legacy_uuid": Optional[str],
"metadata": {
"allowed_passthrough_parameters": List[str], # optional
"autorouter": { # optional
"benchmark_model": Optional[str],
"economical_model": Optional[str],
"id": Optional[str],
"models": List[str], # optional
"profile": Optional[str],
"session_affinity": { # optional
"enabled": bool,
"ttl_seconds": Optional[int],
},
"strong_model": Optional[str],
"v2": { # optional
"aa_creator": { # optional
"id": str,
"name": str,
"slug": Optional[str],
},
"aa_evaluations": Dict[str, Nullable[float]], # optional
"aa_index_is_estimated": Optional[bool],
"aa_index_version": Optional[str],
"aa_is_reasoning": Optional[bool],
"aa_median_output_tokens_per_second": Optional[float],
"aa_median_time_to_first_answer_token": Optional[float],
"aa_median_time_to_first_token_seconds": Optional[float],
"aa_model_id": Optional[str],
"aa_name": Optional[str],
"aa_pricing": Dict[str, Nullable[float]], # optional
"aa_reasoning_effort": Optional[str],
"aa_release_date": Optional[str],
"aa_slug": Optional[str],
"default_effort": Optional[str],
"default_effort_scored": Optional[bool],
"intelligence_index": float,
"price": float,
"reasoning_efforts": Dict[str, AutoRouterV2EffortConfig], # optional
},
"version": Optional[str],
},
"batch_endpoints": List[str], # optional
"cached_image_input_cost": Optional[float],
"cached_input_cost": Optional[float],
"chain_of_thought": Optional[bool],
"context_length": Optional[int],
"context_window": Optional[int],
"cost_efficiency_rating": Optional[int],
"cost_per_image": Optional[float],
"default_max_output_tokens": Optional[int],
"default_speech_response_format": Optional[str],
"deprecation_date": Optional[str],
"embedding_dimensions": Optional[int],
"extended_context_pricing_mode": Optional[str],
"extended_context_threshold": Optional[int],
"function_tools_require_effort_none": Optional[bool],
"fusion": { # optional
"feed_raw_to_synth": bool,
"id": Optional[str],
"judge_model": str,
"max_tool_calls": int,
"orchestrator_model": Optional[str],
"panel_models": List[str],
"preset": str,
"synthesis_mode": str,
"web_tools": bool,
},
"generate_audio": Optional[bool],
"image_input_cost": Optional[float],
"image_output_cost": Optional[float],
"image_token_cost": Optional[float],
"intelligence_rating": Optional[int],
"is_private": bool,
"is_realtime": Optional[bool],
"knowledge_cutoff": Optional[str],
"max_images_per_request": Optional[int],
"max_input_tokens": Optional[int],
"max_output_tokens": Optional[int],
"max_temperature": Optional[float],
"million_fetches_cost": Optional[float],
"million_searches_cost": Optional[float],
"million_tokens_above_128k_cache_read_cost": Optional[float],
"million_tokens_above_128k_cache_write_cost": Optional[float],
"million_tokens_above_128k_input_cost": Optional[float],
"million_tokens_above_128k_output_cost": Optional[float],
"million_tokens_above_200k_cache_read_cost": Optional[float],
"million_tokens_above_200k_cache_write_cost": Optional[float],
"million_tokens_above_200k_input_cost": Optional[float],
"million_tokens_above_200k_output_cost": Optional[float],
"million_tokens_audio_input_cost": Optional[float],
"million_tokens_audio_output_cost": Optional[float],
"million_tokens_batches_input_cost": Optional[float],
"million_tokens_batches_output_cost": Optional[float],
"million_tokens_cache_read_cost": Optional[float],
"million_tokens_cache_write_1h_cost": Optional[float],
"million_tokens_cache_write_5m_cost": Optional[float],
"million_tokens_cache_write_cost": Optional[float],
"million_tokens_input_cost": Optional[float],
"million_tokens_output_cost": Optional[float],
"million_tokens_reasoning_cost": Optional[float],
"multilingual": Optional[bool],
"offline": Optional[bool],
"per_video_second_cost": Optional[float],
"per_video_second_cost_1080p": Optional[float],
"pricing": { # optional
"audio_input": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"audio_output": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"audio_session": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"cache_read": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"cache_write_12h": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"cache_write_1h": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"cache_write_30m": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"cache_write_5m": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"fetch": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"image_cache_read": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"image_input": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"input": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"output": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"reasoning": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"search": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"text_input": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"variants": [{ # optional
"audio_input": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"audio_output": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"audio_session": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"cache_read": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"cache_write_12h": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"cache_write_1h": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"cache_write_30m": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"cache_write_5m": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"fetch": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"image_cache_read": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"image_input": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"input": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"output": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"reasoning": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"search": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"text_input": { # optional
"cost": float,
"currency": str,
"per": int,
"unit": str,
},
"when": str,
}],
},
"reasoning_cost": Optional[float],
"reasoning_tokens": Optional[int],
"region": Optional[str],
"speed_rating": Optional[int],
"supported_embedding_dimensions": { # optional
"max": Optional[int],
"min": Optional[int],
},
"supported_video_aspect_ratios": List[str], # optional
"supported_video_durations": List[int], # optional
"supported_video_frame_images": List[str], # optional
"supported_video_resolutions": List[str], # optional
"supported_video_sizes": List[str], # optional
"supports_adaptive_reasoning": Optional[bool],
"supports_audio_input": Optional[bool],
"supports_audio_output": Optional[bool],
"supports_b64_json_response_format": Optional[bool],
"supports_batch_api": Optional[bool],
"supports_cache_control": Optional[bool],
"supports_citations": Optional[bool],
"supports_classify": Optional[bool],
"supports_code_execution": Optional[bool],
"supports_commercial_use": Optional[bool],
"supports_computer_use": Optional[bool],
"supports_developer_message": Optional[bool],
"supports_direct_cost": Optional[bool],
"supports_distillation": Optional[bool],
"supports_extended_thinking": Optional[bool],
"supports_fine_tuning": Optional[bool],
"supports_google_realtime_api": Optional[bool],
"supports_image_edit": Optional[bool],
"supports_image_input": Optional[bool],
"supports_image_output": Optional[bool],
"supports_images": Optional[bool],
"supports_json_mode_response_format": Optional[bool],
"supports_json_schema_response_format": Optional[bool],
"supports_max_completion_tokens": Optional[bool],
"supports_mid_conversation_system": Optional[bool],
"supports_native_classify": Optional[bool],
"supports_openai_realtime_api": Optional[bool],
"supports_openai_sdk": Optional[bool],
"supports_parallel_tool_calls": Optional[bool],
"supports_pdf_input": Optional[bool],
"supports_prompt_caching": Optional[bool],
"supports_reasoning": Optional[bool],
"supports_reasoning_effort_default": Optional[bool],
"supports_reasoning_effort_high": Optional[bool],
"supports_reasoning_effort_instant": Optional[bool],
"supports_reasoning_effort_low": Optional[bool],
"supports_reasoning_effort_max": Optional[bool],
"supports_reasoning_effort_medium": Optional[bool],
"supports_reasoning_effort_minimal": Optional[bool],
"supports_reasoning_effort_none": Optional[bool],
"supports_reasoning_effort_xhigh": Optional[bool],
"supports_responses_api": Optional[bool],
"supports_sampling_params": Optional[bool],
"supports_service_tier": Optional[bool],
"supports_streaming": Optional[bool],
"supports_strict_tool": Optional[bool],
"supports_structured_outputs": Optional[bool],
"supports_system_message": Optional[bool],
"supports_text": Optional[bool],
"supports_text_input": Optional[bool],
"supports_text_output": Optional[bool],
"supports_thinking_level": Optional[bool],
"supports_thinking_level_low": Optional[bool],
"supports_thinking_level_medium": Optional[bool],
"supports_thinking_level_minimal": Optional[bool],
"supports_tool_calling": Optional[bool],
"supports_tool_choice": Optional[bool],
"supports_transcription": Optional[bool],
"supports_url_context": Optional[bool],
"supports_url_response_format": Optional[bool],
"supports_video_input": Optional[bool],
"supports_video_output": Optional[bool],
"supports_video_seed": Optional[bool],
"supports_vision": Optional[bool],
"supports_web_search": Optional[bool],
"supports_zdr": Optional[bool],
"thinking_enforced": Optional[bool],
},
"model_developer": Optional[str],
"model_family": Optional[str],
"model_id": str,
"model_type": str,
"output_cost": Nullable[float],
"output_currency": str,
"owner": str,
"parameters": [{
"config": Dict[str, Any],
"description": Nullable[str],
"hints": Optional[str],
"id": str,
"is_active": bool,
"name": str,
"parameter": str,
"parameter_type": str,
"position": Optional[int],
}],
"pricing_url": Nullable[str],
"provider": str,
"ref_id": str,
"sharing": { # optional
"allow_fork": bool,
"allow_version_pin": bool,
"auto_grant_new_projects": bool,
"mode": str,
"project_ids": List[str], # optional
},
"updated": str,
}
{
configuration: {
apiKeyEnv?: string;
apiVersion?: string;
authMode?: string;
authType?: string;
baseUrl?: string;
deploymentName?: string;
endpoint?: string;
inferenceProfileArn?: string;
integrationId?: string;
isOpenaiCompatible?: boolean;
isTunedModel?: boolean;
location?: string;
modelId?: string;
projectId?: string;
provider: string;
region?: string;
shouldUseBetaFeatures?: boolean;
subtype?: string;
workspaceId?: string;
};
created: string;
description: string;
displayName: string;
docsUrl: string;
enabled: boolean;
enabledForEndpoints: boolean;
enabledForPlayground: boolean;
hasCpuPricing: boolean;
hasFunctions: boolean;
id: string;
inputCost: number;
inputCurrency: string;
isActive: boolean;
legacyUuid?: string;
metadata: {
allowedPassthroughParameters?: string[];
autorouter?: {
benchmarkModel?: string;
economicalModel?: string;
id?: string;
models?: string[];
profile?: string;
sessionAffinity?: {
enabled: boolean;
ttlSeconds?: number;
};
strongModel?: string;
v2?: {
aaCreator?: {
id: string;
name: string;
slug?: string;
};
aaEvaluations?: Record<string, number>;
aaIndexIsEstimated?: boolean;
aaIndexVersion?: string;
aaIsReasoning?: boolean;
aaMedianOutputTokensPerSecond?: number;
aaMedianTimeToFirstAnswerToken?: number;
aaMedianTimeToFirstTokenSeconds?: number;
aaModelId?: string;
aaName?: string;
aaPricing?: Record<string, number>;
aaReasoningEffort?: string;
aaReleaseDate?: string;
aaSlug?: string;
defaultEffort?: string;
defaultEffortScored?: boolean;
intelligenceIndex: number;
price: number;
reasoningEfforts?: Record<string, AutoRouterV2EffortConfig>;
};
version?: string;
};
batchEndpoints?: string[];
cachedImageInputCost?: number;
cachedInputCost?: number;
chainOfThought?: boolean;
contextLength?: number;
contextWindow?: number;
costEfficiencyRating?: number;
costPerImage?: number;
defaultMaxOutputTokens?: number;
defaultSpeechResponseFormat?: string;
deprecationDate?: string;
embeddingDimensions?: number;
extendedContextPricingMode?: string;
extendedContextThreshold?: number;
functionToolsRequireEffortNone?: boolean;
fusion?: {
feedRawToSynth: boolean;
id?: string;
judgeModel: string;
maxToolCalls: number;
orchestratorModel?: string;
panelModels: string[];
preset: string;
synthesisMode: string;
webTools: boolean;
};
generateAudio?: boolean;
imageInputCost?: number;
imageOutputCost?: number;
imageTokenCost?: number;
intelligenceRating?: number;
isPrivate: boolean;
isRealtime?: boolean;
knowledgeCutoff?: string;
maxImagesPerRequest?: number;
maxInputTokens?: number;
maxOutputTokens?: number;
maxTemperature?: number;
millionFetchesCost?: number;
millionSearchesCost?: number;
millionTokensAbove128kCacheReadCost?: number;
millionTokensAbove128kCacheWriteCost?: number;
millionTokensAbove128kInputCost?: number;
millionTokensAbove128kOutputCost?: number;
millionTokensAbove200kCacheReadCost?: number;
millionTokensAbove200kCacheWriteCost?: number;
millionTokensAbove200kInputCost?: number;
millionTokensAbove200kOutputCost?: number;
millionTokensAudioInputCost?: number;
millionTokensAudioOutputCost?: number;
millionTokensBatchesInputCost?: number;
millionTokensBatchesOutputCost?: number;
millionTokensCacheReadCost?: number;
millionTokensCacheWrite1hCost?: number;
millionTokensCacheWrite5mCost?: number;
millionTokensCacheWriteCost?: number;
millionTokensInputCost?: number;
millionTokensOutputCost?: number;
millionTokensReasoningCost?: number;
multilingual?: boolean;
offline?: boolean;
perVideoSecondCost?: number;
perVideoSecondCost1080p?: number;
pricing?: {
audioInput?: {
cost: number;
currency: string;
per: number;
unit: string;
};
audioOutput?: {
cost: number;
currency: string;
per: number;
unit: string;
};
audioSession?: {
cost: number;
currency: string;
per: number;
unit: string;
};
cacheRead?: {
cost: number;
currency: string;
per: number;
unit: string;
};
cacheWrite12h?: {
cost: number;
currency: string;
per: number;
unit: string;
};
cacheWrite1h?: {
cost: number;
currency: string;
per: number;
unit: string;
};
cacheWrite30m?: {
cost: number;
currency: string;
per: number;
unit: string;
};
cacheWrite5m?: {
cost: number;
currency: string;
per: number;
unit: string;
};
fetch?: {
cost: number;
currency: string;
per: number;
unit: string;
};
imageCacheRead?: {
cost: number;
currency: string;
per: number;
unit: string;
};
imageInput?: {
cost: number;
currency: string;
per: number;
unit: string;
};
input?: {
cost: number;
currency: string;
per: number;
unit: string;
};
output?: {
cost: number;
currency: string;
per: number;
unit: string;
};
reasoning?: {
cost: number;
currency: string;
per: number;
unit: string;
};
search?: {
cost: number;
currency: string;
per: number;
unit: string;
};
textInput?: {
cost: number;
currency: string;
per: number;
unit: string;
};
variants?: {
audioInput?: {
cost: number;
currency: string;
per: number;
unit: string;
};
audioOutput?: {
cost: number;
currency: string;
per: number;
unit: string;
};
audioSession?: {
cost: number;
currency: string;
per: number;
unit: string;
};
cacheRead?: {
cost: number;
currency: string;
per: number;
unit: string;
};
cacheWrite12h?: {
cost: number;
currency: string;
per: number;
unit: string;
};
cacheWrite1h?: {
cost: number;
currency: string;
per: number;
unit: string;
};
cacheWrite30m?: {
cost: number;
currency: string;
per: number;
unit: string;
};
cacheWrite5m?: {
cost: number;
currency: string;
per: number;
unit: string;
};
fetch?: {
cost: number;
currency: string;
per: number;
unit: string;
};
imageCacheRead?: {
cost: number;
currency: string;
per: number;
unit: string;
};
imageInput?: {
cost: number;
currency: string;
per: number;
unit: string;
};
input?: {
cost: number;
currency: string;
per: number;
unit: string;
};
output?: {
cost: number;
currency: string;
per: number;
unit: string;
};
reasoning?: {
cost: number;
currency: string;
per: number;
unit: string;
};
search?: {
cost: number;
currency: string;
per: number;
unit: string;
};
textInput?: {
cost: number;
currency: string;
per: number;
unit: string;
};
when: string;
}[];
};
reasoningCost?: number;
reasoningTokens?: number;
region?: string;
speedRating?: number;
supportedEmbeddingDimensions?: {
max?: number;
min?: number;
};
supportedVideoAspectRatios?: string[];
supportedVideoDurations?: number[];
supportedVideoFrameImages?: string[];
supportedVideoResolutions?: string[];
supportedVideoSizes?: string[];
supportsAdaptiveReasoning?: boolean;
supportsAudioInput?: boolean;
supportsAudioOutput?: boolean;
supportsB64JsonResponseFormat?: boolean;
supportsBatchApi?: boolean;
supportsCacheControl?: boolean;
supportsCitations?: boolean;
supportsClassify?: boolean;
supportsCodeExecution?: boolean;
supportsCommercialUse?: boolean;
supportsComputerUse?: boolean;
supportsDeveloperMessage?: boolean;
supportsDirectCost?: boolean;
supportsDistillation?: boolean;
supportsExtendedThinking?: boolean;
supportsFineTuning?: boolean;
supportsGoogleRealtimeApi?: boolean;
supportsImageEdit?: boolean;
supportsImageInput?: boolean;
supportsImageOutput?: boolean;
supportsImages?: boolean;
supportsJsonModeResponseFormat?: boolean;
supportsJsonSchemaResponseFormat?: boolean;
supportsMaxCompletionTokens?: boolean;
supportsMidConversationSystem?: boolean;
supportsNativeClassify?: boolean;
supportsOpenaiRealtimeApi?: boolean;
supportsOpenaiSDK?: boolean;
supportsParallelToolCalls?: boolean;
supportsPdfInput?: boolean;
supportsPromptCaching?: boolean;
supportsReasoning?: boolean;
supportsReasoningEffortDefault?: boolean;
supportsReasoningEffortHigh?: boolean;
supportsReasoningEffortInstant?: boolean;
supportsReasoningEffortLow?: boolean;
supportsReasoningEffortMax?: boolean;
supportsReasoningEffortMedium?: boolean;
supportsReasoningEffortMinimal?: boolean;
supportsReasoningEffortNone?: boolean;
supportsReasoningEffortXhigh?: boolean;
supportsResponsesApi?: boolean;
supportsSamplingParams?: boolean;
supportsServiceTier?: boolean;
supportsStreaming?: boolean;
supportsStrictTool?: boolean;
supportsStructuredOutputs?: boolean;
supportsSystemMessage?: boolean;
supportsText?: boolean;
supportsTextInput?: boolean;
supportsTextOutput?: boolean;
supportsThinkingLevel?: boolean;
supportsThinkingLevelLow?: boolean;
supportsThinkingLevelMedium?: boolean;
supportsThinkingLevelMinimal?: boolean;
supportsToolCalling?: boolean;
supportsToolChoice?: boolean;
supportsTranscription?: boolean;
supportsUrlContext?: boolean;
supportsUrlResponseFormat?: boolean;
supportsVideoInput?: boolean;
supportsVideoOutput?: boolean;
supportsVideoSeed?: boolean;
supportsVision?: boolean;
supportsWebSearch?: boolean;
supportsZdr?: boolean;
thinkingEnforced?: boolean;
};
modelDeveloper?: string;
modelFamily?: string;
modelId: string;
modelType: string;
outputCost: number;
outputCurrency: string;
owner: string;
parameters: {
config: Record<string, any>;
description: string;
hints?: string;
id: string;
isActive: boolean;
name: string;
parameter: string;
parameterType: string;
position?: number;
}[];
pricingUrl: string;
provider: string;
refId: string;
sharing?: {
allowFork: boolean;
allowVersionPin: boolean;
autoGrantNewProjects: boolean;
mode: string;
projectIds?: string[];
};
updated: string;
}