Passer directement au contenu principal

Ce navigateur n’est plus pris en charge.

Effectuez une mise à niveau vers Microsoft Edge pour tirer parti des dernières fonctionnalités, des mises à jour de sécurité et du support technique.

Télécharger Microsoft Edge Plus d’informations sur Internet Explorer et Microsoft Edge
microsoft-foundry.rest.security.o-auth2-auth

Agents

Create an agent Create a new code-based agent

POST /agents

Creates a new agent or a new version of an existing agent. Creates a new code-based agent. Uploads the code zip and creates the agent in a single call. The agent name is provided in the x-ms-agent-name header since POST /agents has no name in the URL path. The SHA-256 hex digest of the zip is provided in the x-ms-code-zip-sha256 header for integrity and dedup. The request body is multipart/form-data with a JSON metadata part and a binary code part (part order is irrelevant). Maximum upload size is 250 MB.

Paramètres d’en-tête

Foundry-Features enum

A feature flag opt-in required when using preview operations or modifying persisted preview resources.

WorkflowAgents=V1PreviewExternalAgents=V1PreviewDraftAgents=V1PreviewVoiceAgents=V1PreviewDigitalWorker=V1PreviewGitHubCopilot=V1PreviewSkills=V1Preview
x-ms-agent-name string

The unique name that identifies the agent. Max 63 chars, must start and end with alphanumeric, hyphens allowed in the middle.

x-ms-code-zip-sha256 string

SHA-256 hex digest of the uploaded code zip. Used for change detection (dedup) and integrity verification.

Paramètres de la requête

api-version string obligatoire

The API version to use for this operation.

Corps de la demande

The content multipart request content.

Content-Type: application/json
name string obligatoire

The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent. - Must start and end with alphanumeric characters, - Can contain hyphens in the middle - Must not exceed 63 characters.

state string | enum

The operational state of an agent.

Un des éléments suivants :
string
enum
enableddisabled
metadata object

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

[key: string] string
description string

A human-readable description of the agent.

definition hosted | prompt | workflow | external | voice obligatoire
Celui-ci peut avoir l'une des valeurs suivantes :
hosted HostedAgentDefinition

The hosted agent definition.

kind enum obligatoire
hosted
cpu string obligatoire

The CPU configuration for the hosted agent.

memory string obligatoire

The memory configuration for the hosted agent.

environment_variables object

Environment variables to set in the hosted agent container.

[key: string] string
container_configuration ContainerConfiguration

Container-based deployment configuration for a hosted agent.

image string obligatoire

The container image for the hosted agent.

registry_connection_id string

The id (or name) of the Foundry project connection that provides the credentials used to authenticate to the private container registry hosting image. The connection abstracts the auth mechanism — for example a managed-identity-federated token exchange, or a username/token secret — so registry credentials are never part of the agent definition. Omit for public images or registries already reachable by the platform's default identity (for example, Azure Container Registry).

protocol_versions ProtocolVersionRecord[]

The protocols that the agent supports for ingress communication.

code_configuration CodeConfiguration

Code-based deployment configuration for a hosted agent.

runtime string obligatoire

The runtime identifier for code execution (e.g., 'python_3_11', 'python_3_12', 'python_3_13').

entry_point string[] obligatoire

The entry point command and arguments for the code execution.

dependency_resolution string | enum obligatoire

How package dependencies are resolved at deployment time for a code-based hosted agent.

Un des éléments suivants :
string
enum
bundledremote_build
content_hash string

The SHA-256 hex digest of the uploaded code zip. Set by the service from the x-ms-code-zip-sha256 request header; read-only in responses and never accepted in request payloads.

telemetry_config TelemetryConfig

Customer-supplied telemetry configuration for exporting container logs, traces, and metrics.

endpoints TelemetryEndpoint[] obligatoire

Customer-supplied telemetry export endpoint configurations.

session_configuration SessionConfiguration

Session defaults applied to sessions created for a hosted agent version.

idle_timeout_seconds integer

The idle duration, in seconds, before a session's sandbox is suspended. Optional — when unset, the server default of 900 seconds is used. Must be between 120 and 3600 seconds (inclusive).

prompt PromptAgentDefinition

The prompt agent definition

kind enum obligatoire
prompt
harness github_copilot_preview

A managed runtime and agent loop used to execute a prompt agent.

Celui-ci peut avoir l'une des valeurs suivantes :
github_copilot_preview GitHubCopilotHarness

The GitHub Copilot managed harness for prompt agents.

type enum obligatoire

The type of managed harness. Always github_copilot_preview.

github_copilot_preview
model string obligatoire

The model deployment to use for this agent.

instructions string | null

A system (or developer) message inserted into the model's context.

skills SkillReference[]

The Foundry skills available to this prompt agent. An omitted skill version is resolved and pinned when the agent version is created.

temperature number | null

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. Defaults to 1.

top_p number | null

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. Defaults to 1.

reasoning OpenAI.Reasoning | null

Configuration options for reasoning models.

mode string | enum
Un des éléments suivants :
string
enum
standardpro
effort string | enum | null

Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, xhigh, and max. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the reasoning guide for model-specific support.

Un des éléments suivants :
string
enum
noneminimallowmediumhighxhighmax
summary enum
autoconcisedetailed
context enum
autocurrent_turnall_turns
generate_summary enum
autoconcisedetailed
tools OpenAI.Tool[]

An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter.

tool_choice string | OpenAI.ToolChoiceParam

How the model should select which tool (or tools) to use when generating a response. See the tools parameter to see how to specify which tools the model can call.

Un des éléments suivants :
string
Celui-ci peut avoir l'une des valeurs suivantes :
function OpenAI.ToolChoiceFunction

Use this option to force the model to call a specific function.

type enum obligatoire

For function calling, the type is always function.

function
name string obligatoire

The name of the function to call.

mcp OpenAI.ToolChoiceMCP

Use this option to force the model to call a specific tool on a remote MCP server.

type enum obligatoire

For MCP tools, the type is always mcp.

mcp
server_label string obligatoire

The label of the MCP server to use.

name string | null
allowed_tools OpenAI.ToolChoiceAllowed

Constrains the tools available to the model to a pre-defined set.

type enum obligatoire

Allowed tool configuration type. Always allowed_tools.

allowed_tools
mode enum obligatoire

Constrains the tools available to the model to a pre-defined set. auto allows the model to pick from among the allowed tools and generate a message. required requires the model to call one or more of the allowed tools.

autorequired
tools object[] obligatoire

A list of tool definitions that the model should be allowed to call. For the Responses API, the list of tool definitions might look like: json [ { "type": "function", "name": "get_weather" }, { "type": "mcp", "server_label": "deepwiki" }, { "type": "image_generation" } ]

custom OpenAI.ToolChoiceCustom

Use this option to force the model to call a specific custom tool.

type enum obligatoire

For custom tool calling, the type is always custom.

custom
name string obligatoire

The name of the custom tool to call.

programmatic_tool_calling OpenAI.SpecificProgrammaticToolCallingParam
type enum obligatoire

The tool to call. Always programmatic_tool_calling.

programmatic_tool_calling
apply_patch OpenAI.SpecificApplyPatchParam

Forces the model to call the apply_patch tool when executing a tool call.

type enum obligatoire

The tool to call. Always apply_patch.

apply_patch
shell OpenAI.SpecificFunctionShellParam

Forces the model to call the shell tool when a tool call is required.

type enum obligatoire

The tool to call. Always shell.

shell
file_search OpenAI.ToolChoiceFileSearch

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
file_search
web_search_preview OpenAI.ToolChoiceWebSearchPreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
web_search_preview
computer_use_preview OpenAI.ToolChoiceComputerUsePreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
computer_use_preview
web_search_preview_2025_03_11 OpenAI.ToolChoiceWebSearchPreview20250311

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
web_search_preview_2025_03_11
image_generation OpenAI.ToolChoiceImageGeneration

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
image_generation
code_interpreter OpenAI.ToolChoiceCodeInterpreter

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
code_interpreter
computer OpenAI.ToolChoiceComputer

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
computer
computer_use OpenAI.ToolChoiceComputerUse

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
computer_use
text PromptAgentDefinitionTextOptions

Configuration options for a text response from the model. Can be plain text or structured JSON data.

format json_schema | text | json_object

An object specifying the format that the model must output. Configuring { "type": "json_schema" } enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. The default format is { "type": "text" } with no additional options. Not recommended for gpt-4o and newer models:* Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it.

Celui-ci peut avoir l'une des valeurs suivantes :
json_schema OpenAI.TextResponseFormatJsonSchema

JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.

type enum obligatoire

The type of response format being defined. Always json_schema.

json_schema
description string

A description of what the response format is for, used by the model to determine how to respond in the format.

name string obligatoire

The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.

schema OpenAI.ResponseFormatJsonSchemaSchema obligatoire

The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.

strict boolean | null
text OpenAI.TextResponseFormatConfigurationResponseFormatText

Default response format. Used to generate text responses.

type enum obligatoire

The type of response format being defined. Always text.

text
json_object OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject

JSON object response format. An older method of generating JSON responses. Using json_schema is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.

type enum obligatoire

The type of response format being defined. Always json_object.

json_object
structured_inputs object

Set of structured inputs that can participate in prompt template substitution or tool argument bindings.

[key: string] StructuredInputDefinition

An structured input that can participate in prompt template substitutions and tool argument binding.

description string

A human-readable description of the input.

default_value StructuredInputDefinition

The default value for the input if no run-time value is provided.

schema object

The JSON schema for the structured input (optional).

required boolean

Whether the input property is required when the agent is invoked. The service defaults to false if a value is not specified by the caller.

workflow WorkflowAgentDefinition

The workflow agent definition. Microsoft Foundry is retiring workflows on December 1, 2026. If you're looking to build new workflows, use Microsoft Agent Framework. To migrate existing workflows, see the Migration guide.

kind enum obligatoire
workflow
workflow string

The CSDL YAML definition of the workflow.

external ExternalAgentDefinition

The external agent definition. Represents a third-party agent hosted outside Foundry (for example, on GCP or AWS). Registration is metadata-only: Foundry records the agent definition to light up observability experiences (traces, evaluations) over customer-emitted OpenTelemetry data.

kind enum obligatoire
external
otel_agent_id string

The OpenTelemetry agent identifier used to attribute customer-emitted spans to this Foundry agent. Spans must include the attribute gen_ai.agent.id = <otel_agent_id> to appear under this registration. Defaults to the top-level agent name when omitted. Provide an explicit value only for migration scenarios where the running external agent already emits a stable id that differs from the Foundry agent name. The resolved value is always echoed on read.

voice VoiceAgentDefinition

The voice agent definition. Its configuration (model, instructions, audio, tools, and optional avatar) drives a managed speech-to-speech experience. Establish realtime voice sessions through GET /agents/{agent_name}/endpoint/protocols/voice. Every create or update produces a new immutable version.

kind enum obligatoire

The kind discriminator for a voice agent definition. Always voice.

voice
model_type string | enum

How the model backing a voice agent is served. This is independent of the architecture (realtime or cascaded), which the service derives from the selected model.

Un des éléments suivants :
string
enum
managedself_deployed
model string

The model to use for this agent. Required with model_type for a model-backed voice agent and omitted when conversation_engine is provided. The model must support realtime or cascaded voice.

conversation_engine hosted_agent

An engine that owns conversation handling for a voice agent.

Celui-ci peut avoir l'une des valeurs suivantes :
hosted_agent VoiceHostedAgentConversationEngine

A closed reference to the hosted text agent that owns conversation handling for a voice agent. The hosted agent is resolved within the same project and must support the invocations_ws protocol, Voice Live compatibility, and Bridge Protocol 1.0.

type enum obligatoire

Selects a hosted Foundry agent as the conversation engine.

hosted_agent
name string obligatoire

The non-empty DNS-like name of the target hosted text agent in the same project.

version string

The target agent version. Omit this property to select the latest version when the voice session starts. When supplied, use a positive integer or draft-{positive-unix-timestamp} whose numeric component fits in a signed 64-bit integer.

instructions string

A system (or developer) message inserted into the model's context. Supports template substitution via structured_inputs, rendered per session before the live session starts.

greeting template | llm_generated

Session-start greeting configuration for a voice agent.

Celui-ci peut avoir l'une des valeurs suivantes :
template VoiceAgentTemplateGreetingConfig

A deterministic greeting rendered with the voice agent's structured inputs and synthesized without model-authored generation.

type enum obligatoire
template
text string obligatoire

The Handlebars text template spoken at session start.

llm_generated VoiceAgentLlmGeneratedGreetingConfig

A greeting authored by the session model from a scoped opening-turn prompt.

type enum obligatoire
llm_generated
prompt string obligatoire

The Handlebars prompt that guides the opening turn.

tool_choice enum | OpenAI.ToolChoiceFunction | OpenAI.ToolChoiceMCP

Tool-selection behavior for a voice agent.

Celui-ci peut avoir l'une des valeurs suivantes :
enum
noneautorequired
type enum obligatoire

For function calling, the type is always function.

function
name string obligatoire

The name of the function to call.

type enum obligatoire

For MCP tools, the type is always mcp.

mcp
server_label string obligatoire

The label of the MCP server to use.

name string | null
audio VoiceAgentAudioConfig

The audio configuration for a voice agent. These values are session defaults and may be overridden when connecting.

input VoiceAgentAudioInputConfig

Input audio configuration for a voice agent.

format audio/pcm | audio/pcmu | audio/pcma
Celui-ci peut avoir l'une des valeurs suivantes :
audio/pcm OpenAI.RealtimeAudioFormatsAudioPcm
type enum obligatoire
audio/pcm
rate enum
24000
audio/pcmu OpenAI.RealtimeAudioFormatsAudioPcmu
type enum obligatoire
audio/pcmu
audio/pcma OpenAI.RealtimeAudioFormatsAudioPcma
type enum obligatoire
audio/pcma
noise_reduction VoiceAgentNoiseReduction | null

Input noise reduction. Set to null to disable.

type string | enum obligatoire

The input audio noise reduction mode.

Un des éléments suivants :
string
enum
near_fieldfar_fieldazure_deep_noise_suppression
turn_detection server_vad | azure_semantic_vad | azure_semantic_vad_en | azure_semantic_vad_multilingual | semantic_vad | null

Turn (end-of-speech) detection. Server-side turn detection is enabled by default; set to null to disable it, in which case the client must trigger responses manually.

Celui-ci peut avoir l'une des valeurs suivantes :
server_vad VoiceAgentServerVadTurnDetection

Server-side voice activity detection.

threshold number
prefix_padding_ms integer
silence_duration_ms integer
create_response boolean
interrupt_response boolean
idle_timeout_ms integer | null
type enum obligatoire
server_vad
speech_duration_ms integer

A duration encoded as an integer number of milliseconds.

end_of_utterance_detection VoiceAgentEndOfUtteranceDetection | null

Semantic end-of-utterance detection configuration. Set to null to disable it.

model string | enum obligatoire

The semantic end-of-utterance detection model.

Un des éléments suivants :
string
enum
semantic_detection_v1semantic_detection_v1_ensemantic_detection_v1_multilingualsmart_end_of_turn_detection
threshold_level string | enum

The sensitivity threshold for semantic end-of-utterance detection.

Un des éléments suivants :
string
enum
lowmediumhighdefault
timeout_ms integer

A duration encoded as an integer number of milliseconds.

azure_semantic_vad VoiceAgentAzureSemanticVadTurnDetection

Azure semantic voice activity detection.

type enum obligatoire
azure_semantic_vad
threshold number

Activation threshold for voice activity detection, from 0 to 1.

prefix_padding_ms integer

A duration encoded as an integer number of milliseconds.

silence_duration_ms integer

A duration encoded as an integer number of milliseconds.

idle_timeout_ms integer

A duration encoded as an integer number of milliseconds.

end_of_utterance_detection VoiceAgentEndOfUtteranceDetection | null

Semantic end-of-utterance detection configuration. Set to null to disable it.

model string | enum obligatoire

The semantic end-of-utterance detection model.

Un des éléments suivants :
string
enum
semantic_detection_v1semantic_detection_v1_ensemantic_detection_v1_multilingualsmart_end_of_turn_detection
threshold_level string | enum

The sensitivity threshold for semantic end-of-utterance detection.

Un des éléments suivants :
string
enum
lowmediumhighdefault
timeout_ms integer

A duration encoded as an integer number of milliseconds.

speech_duration_ms integer

A duration encoded as an integer number of milliseconds.

remove_filler_words boolean

Whether filler words are removed from transcription.

create_response boolean

Whether a response is created automatically when speech stops.

interrupt_response boolean

Whether user speech may interrupt the agent's response.

languages string[]

BCP-47 language codes used for speech detection.

azure_semantic_vad_en VoiceAgentAzureSemanticVadEnTurnDetection

English-optimized Azure semantic voice activity detection.

type enum obligatoire
azure_semantic_vad_en
threshold number

Activation threshold for voice activity detection, from 0 to 1.

prefix_padding_ms integer

A duration encoded as an integer number of milliseconds.

silence_duration_ms integer

A duration encoded as an integer number of milliseconds.

idle_timeout_ms integer

A duration encoded as an integer number of milliseconds.

end_of_utterance_detection VoiceAgentEndOfUtteranceDetection | null

Semantic end-of-utterance detection configuration. Set to null to disable it.

model string | enum obligatoire

The semantic end-of-utterance detection model.

Un des éléments suivants :
string
enum
semantic_detection_v1semantic_detection_v1_ensemantic_detection_v1_multilingualsmart_end_of_turn_detection
threshold_level string | enum

The sensitivity threshold for semantic end-of-utterance detection.

Un des éléments suivants :
string
enum
lowmediumhighdefault
timeout_ms integer

A duration encoded as an integer number of milliseconds.

speech_duration_ms integer

A duration encoded as an integer number of milliseconds.

remove_filler_words boolean

Whether filler words are removed from transcription.

create_response boolean

Whether a response is created automatically when speech stops.

interrupt_response boolean

Whether user speech may interrupt the agent's response.

azure_semantic_vad_multilingual VoiceAgentAzureSemanticVadMultilingualTurnDetection

Multilingual Azure semantic voice activity detection.

type enum obligatoire
azure_semantic_vad_multilingual
threshold number

Activation threshold for voice activity detection, from 0 to 1.

prefix_padding_ms integer

A duration encoded as an integer number of milliseconds.

silence_duration_ms integer

A duration encoded as an integer number of milliseconds.

idle_timeout_ms integer

A duration encoded as an integer number of milliseconds.

end_of_utterance_detection VoiceAgentEndOfUtteranceDetection | null

Semantic end-of-utterance detection configuration. Set to null to disable it.

model string | enum obligatoire

The semantic end-of-utterance detection model.

Un des éléments suivants :
string
enum
semantic_detection_v1semantic_detection_v1_ensemantic_detection_v1_multilingualsmart_end_of_turn_detection
threshold_level string | enum

The sensitivity threshold for semantic end-of-utterance detection.

Un des éléments suivants :
string
enum
lowmediumhighdefault
timeout_ms integer

A duration encoded as an integer number of milliseconds.

speech_duration_ms integer

A duration encoded as an integer number of milliseconds.

remove_filler_words boolean

Whether filler words are removed from transcription.

create_response boolean

Whether a response is created automatically when speech stops.

interrupt_response boolean

Whether user speech may interrupt the agent's response.

languages string[]

BCP-47 language codes used for speech detection.

semantic_vad VoiceAgentSemanticVadTurnDetection

OpenAI semantic VAD turn-detection settings.

eagerness enum
lowmediumhighauto
create_response boolean
interrupt_response boolean
type enum obligatoire
semantic_vad
echo_cancellation VoiceAgentEchoCancellation | null

Optional server-side echo cancellation settings.

type enum obligatoire

The echo cancellation implementation. Always server_echo_cancellation.

server_echo_cancellation
reference_source enum

The source of reference audio used for echo cancellation.

serverclient
channels integer

The number of input channels. Use two interleaved channels when reference_source is client.

transcription VoiceAgentInputTranscription | null

Asynchronous input-audio transcription. Set to null to disable transcription.

language string

The language of the input audio. Supplying the input language in ISO-639-1 (e.g. en) format will improve accuracy and latency.

languages string[]

Possible languages of the input audio, in ISO-639-1 format. Supported by gpt-transcribe and gpt-live-transcribe.

keywords string[]

Words or phrases to guide transcription of the input audio. Supported by gpt-transcribe and gpt-live-transcribe.

prompt string

An optional text to guide the model's style or continue a previous audio segment. For whisper-1, the prompt is a list of keywords. For gpt-4o-transcribe models (excluding gpt-4o-transcribe-diarize), the prompt is a free text string, for example "expect words related to technology". Prompt is not supported with gpt-realtime-whisper in GA Realtime sessions.

delay enum

Controls how long the model waits before emitting transcription text. Higher values can improve transcription accuracy at the cost of latency. Only supported with gpt-realtime-whisper in GA Realtime sessions.

minimallowmediumhighxhigh
model string | enum obligatoire

The input-audio transcription model identifier. This is a model name, not a Foundry deployment name. Mirrors the transcription models supported by the managed voice backend, covering the OpenAI Realtime transcription models plus the Azure and MAI models. Additional values may be added over time.

Un des éléments suivants :
string
enum
whisper-1gpt-realtime-whispergpt-4o-transcribegpt-4o-mini-transcribegpt-4o-transcribe-diarizegpt-transcribegpt-live-transcribemai-transcribeazure-speech
custom_speech object

Optional customer custom speech deployment configuration, keyed by locale.

[key: string] string
phrase_list string[]

Optional phrase hints that bias recognition toward domain terms.

output VoiceAgentAudioOutputConfig

Output audio configuration for a voice agent. Provider-specific fields are selected by voice_type: - openai: voice and speed. - azure-standard: voice, voice_locale, speed, voice_temperature, custom_lexicon_url, custom_text_normalization_url, prefer_locales, style, pitch, and volume. - azure-custom: all azure-standard fields except style, plus custom_voice_endpoint_id. - azure-personal: all azure-standard fields except style, plus personal_voice_model. - avatar-voice-sync: all azure-standard fields except voice and style, plus personal_voice_model; the voice name is derived from the avatar. - azure-realtime-native: voice and speed. format and output_audio_timestamp_types apply to every voice type.

format audio/pcm | audio/pcmu | audio/pcma
Celui-ci peut avoir l'une des valeurs suivantes :
audio/pcm OpenAI.RealtimeAudioFormatsAudioPcm
type enum obligatoire
audio/pcm
rate enum
24000
audio/pcmu OpenAI.RealtimeAudioFormatsAudioPcmu
type enum obligatoire
audio/pcmu
audio/pcma OpenAI.RealtimeAudioFormatsAudioPcma
type enum obligatoire
audio/pcma
voice string

The voice name or identifier. Applies to openai, azure-standard, azure-custom, azure-personal, and azure-realtime-native. It does not apply to avatar-voice-sync, which derives the voice name from the avatar.

voice_type string | enum

The voice implementation. Additional values may be added over time.

Un des éléments suivants :
string
enum
openaiazure-standardazure-customazure-personalavatar-voice-syncazure-realtime-native
voice_locale string

The enforced BCP-47 output locale. Applies to azure-standard, azure-custom, azure-personal, and avatar-voice-sync.

speed number

The numeric output speed multiplier. Applies to all known voice_type values and defaults to 1.

voice_temperature number

The voice variation temperature. Applies to azure-standard, azure-custom, azure-personal, and avatar-voice-sync.

custom_lexicon_url string

The URL of a custom pronunciation lexicon. Applies to azure-standard, azure-custom, azure-personal, and avatar-voice-sync.

custom_text_normalization_url string

The URL of a custom text-normalization configuration. Applies to azure-standard, azure-custom, azure-personal, and avatar-voice-sync.

prefer_locales string[]

Preferred BCP-47 locales for multilingual synthesis. Applies to azure-standard, azure-custom, azure-personal, and avatar-voice-sync.

style string

The voice speaking style. Applies only when voice_type is azure-standard.

pitch string

The voice pitch adjustment. Applies to azure-standard, azure-custom, azure-personal, and avatar-voice-sync.

volume string

The voice volume adjustment. Applies to azure-standard, azure-custom, azure-personal, and avatar-voice-sync.

custom_voice_endpoint_id string

The Azure custom-voice deployment endpoint identifier. Applies only when voice_type is azure-custom.

personal_voice_model string

The Azure personal or avatar voice model. Applies only when voice_type is azure-personal or avatar-voice-sync.

output_audio_timestamp_types enum[]

Timestamp kinds to include with output audio. Applies to every voice_type.

output_modalities VoiceOutputModality[]

The output modalities the agent produces. Defaults to ["audio"]. animation and avatar are available when an avatar is configured.

max_output_tokens integer | enum

The maximum output-token count or the literal inf.

Un des éléments suivants :
integer
enum
inf
include enum[]

Additional fields to include in service outputs.

interim_response static_interim_response | llm_interim_response

Fields shared by interim-response configurations.

Celui-ci peut avoir l'une des valeurs suivantes :
static_interim_response VoiceAgentStaticInterimResponseConfig

A static interim response selected from configured text.

type enum obligatoire
static_interim_response
texts string[]

Candidate text values for the interim response.

llm_interim_response VoiceAgentLlmInterimResponseConfig

An interim response generated by a language model.

type enum obligatoire
llm_interim_response
model string

The model used to generate interim responses.

instructions string

Optional instructions for generating interim responses.

max_completion_tokens integer

The maximum completion-token count for an interim response.

avatar VoiceAgentAvatarConfig

Avatar configuration for a voice agent. These values are session defaults and may be overridden when connecting.

type string | enum obligatoire

The avatar type.

Un des éléments suivants :
string
enum
video_avatarphoto_avatar
character string obligatoire

The avatar character identifier, e.g. 'lisa'.

style string

The avatar style, e.g. 'casual-sitting'.

customized boolean

Whether the avatar is a customer-customized avatar. Defaults to false.

output_protocol string | enum

The transport used to deliver the avatar video stream.

Un des éléments suivants :
string
enum
webrtcwebsocket
model string

The avatar model identifier.

video VoiceAgentAvatarVideoParams

Avatar video encoder and presentation settings.

bitrate integer

The target video bitrate in bits per second.

crop VoiceAgentAvatarVideoCrop

The rectangular crop applied to avatar video.

bottom_right integer[] obligatoire
top_left integer[] obligatoire
resolution VoiceAgentAvatarVideoResolution

The avatar video resolution.

width integer obligatoire
height integer obligatoire
background VoiceAgentAvatarVideoBackground

The avatar video background.

image_url string
color string
gop_size integer
scene VoiceAgentAvatarScene

Avatar placement and motion settings.

zoom number
position_x number
position_y number
rotation_x number
rotation_y number
rotation_z number
amplitude number
output_audit_audio boolean

Whether audit audio is emitted with avatar output. Defaults to false.

tools VoiceAgentTool[]

The tools the voice agent may use. Supported tool kinds are function (executed by the client), mcp, system (service-managed session controls), and toolbox. Server-side tools such as web_search, azure_ai_search, and openapi are provided through a toolbox rather than declared directly.

tool_choice enum | OpenAI.ToolChoiceFunction | OpenAI.ToolChoiceMCP

Tool-selection behavior for a voice agent.

Celui-ci peut avoir l'une des valeurs suivantes :
enum
noneautorequired
type enum obligatoire

For function calling, the type is always function.

function
name string obligatoire

The name of the function to call.

type enum obligatoire

For MCP tools, the type is always mcp.

mcp
server_label string obligatoire

The label of the MCP server to use.

name string | null
parallel_tool_calls boolean

Whether the model may call multiple tools in parallel.

structured_inputs object

Set of structured inputs that participate in prompt template substitution, rendered per session before the live session starts.

[key: string] StructuredInputDefinition

An structured input that can participate in prompt template substitutions and tool argument binding.

description string

A human-readable description of the input.

default_value StructuredInputDefinition

The default value for the input if no run-time value is provided.

schema object

The JSON schema for the structured input (optional).

required boolean

Whether the input property is required when the agent is invoked. The service defaults to false if a value is not specified by the caller.

subagent_config VoiceAgentSubagentConfig

Configuration for sibling Foundry text agents that a voice agent may consult.

subagents VoiceAgentSubagent[] obligatoire

The sibling Foundry text agents, in the same project, that this voice agent may consult.

store boolean

Whether conversations with this agent are persisted. A single, all-or-nothing persistence switch that defaults to false (privacy-safe: off by default). When true, Foundry persists the full conversation — the transcript/event timeline and raw audio. When false, nothing is persisted and no conversation is surfaced. There is no separate audio-logging control; audio is persisted only as part of this switch. Latency/performance telemetry (e.g. time-to-first-audio, inter-token latency, interruption) is observability-only (customer trace / App Insights) and is not part of the persisted conversation content.

blueprint_reference ManagedAgentIdentityBlueprint
Celui-ci peut avoir l'une des valeurs suivantes :
ManagedAgentIdentityBlueprint ManagedAgentIdentityBlueprintReference
type enum obligatoire
ManagedAgentIdentityBlueprint
blueprint_id string obligatoire

The ID of the managed blueprint

digital_worker_type string | enum

The type of digital worker.

Un des éléments suivants :
string
enum
m365
draft boolean

(Preview) Whether this agent version is a draft (candidate) rather than a release. The service defaults to false if a value is not specified by the caller. Draft versions are recorded but excluded from default 'latest' resolution and are not auto-promoted.

agent_endpoint AgentEndpointConfig
version_selector VersionSelector
version_selection_rules VersionSelectionRule[] obligatoire
protocol_configuration ProtocolConfiguration

Per-protocol configuration for the agent endpoint.

activity ActivityProtocolConfiguration

Configuration specific to the activity protocol.

enable_m365_public_endpoint boolean

Whether to enable the M365 public endpoint for the activity protocol.

access_boundaries ActivityProtocolAccessBoundary[]

The access boundaries for the activity protocol.

responses ResponsesProtocolConfiguration

Configuration specific to the responses protocol.

a2a A2AProtocolConfiguration

Configuration specific to the A2A protocol.

mcp McpProtocolConfiguration

Configuration specific to the MCP protocol.

invocations InvocationsProtocolConfiguration

Configuration specific to the invocations protocol.

invocations_ws InvocationsWsProtocolConfiguration

Configuration specific to the WebSocket-based invocations protocol.

authorization_schemes AgentEndpointAuthorizationScheme[]

The authorization schemes supported by the agent endpoint

publish_approval_status string | enum

The Microsoft Agent Certification review status of the Microsoft 365 store title published for an agent.

Un des éléments suivants :
string
enum
not_publishedpendingapprovedrejectedno_approval_needed
agent_card AgentCard
version string obligatoire

The version of the agent card.

description string

The description of the agent card.

skills AgentCardSkill[] obligatoire

The set of skills that an agent can perform.

Content-Type: multipart/form-data
metadata CreateAgentFromCodeContent obligatoire

JSON metadata including description and hosted definition.

code CreateAgentFromCodeContent obligatoire

The code zip file (max 250 MB).

Réponses

The request has succeeded.

Corps

Content-Type: application/json
object enum obligatoire

The object type, which is always 'agent'.

agent
id string obligatoire

The unique identifier of the agent.

name string obligatoire

The name of the agent.

state string | enum obligatoire

The operational state of an agent.

Un des éléments suivants :
string
enum
enableddisabled
configuration_state string | enum obligatoire

The operational state of an agent.

Un des éléments suivants :
string
enum
enableddisabled
state_source string | enum

Indicates the source of an agent's operational state. Empty when the state is not derived from a specific source.

Un des éléments suivants :
string
enum
agent_instance_identityagent_blueprint
versions AgentObject obligatoire

The latest version of the agent.

latest AgentVersionObject obligatoire
metadata object | null obligatoire

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

[key: string] string
object enum obligatoire

The object type, which is always 'agent.version'.

agent.version
id string obligatoire

The unique identifier of the agent version.

name string obligatoire

The name of the agent. Name can be used to retrieve/update/delete the agent.

version string obligatoire

The version identifier of the agent. Agents are immutable and every update creates a new version while keeping the name same.

description string

A human-readable description of the agent.

created_at integer obligatoire
definition hosted | prompt | workflow | external | voice obligatoire
Celui-ci peut avoir l'une des valeurs suivantes :
hosted HostedAgentDefinition

The hosted agent definition.

kind enum obligatoire
hosted
cpu string obligatoire

The CPU configuration for the hosted agent.

memory string obligatoire

The memory configuration for the hosted agent.

environment_variables object

Environment variables to set in the hosted agent container.

[key: string] string
container_configuration ContainerConfiguration

Container-based deployment configuration for a hosted agent.

image string obligatoire

The container image for the hosted agent.

registry_connection_id string

The id (or name) of the Foundry project connection that provides the credentials used to authenticate to the private container registry hosting image. The connection abstracts the auth mechanism — for example a managed-identity-federated token exchange, or a username/token secret — so registry credentials are never part of the agent definition. Omit for public images or registries already reachable by the platform's default identity (for example, Azure Container Registry).

protocol_versions ProtocolVersionRecord[]

The protocols that the agent supports for ingress communication.

code_configuration CodeConfiguration

Code-based deployment configuration for a hosted agent.

runtime string obligatoire

The runtime identifier for code execution (e.g., 'python_3_11', 'python_3_12', 'python_3_13').

entry_point string[] obligatoire

The entry point command and arguments for the code execution.

dependency_resolution string | enum obligatoire

How package dependencies are resolved at deployment time for a code-based hosted agent.

Un des éléments suivants :
string
enum
bundledremote_build
content_hash string

The SHA-256 hex digest of the uploaded code zip. Set by the service from the x-ms-code-zip-sha256 request header; read-only in responses and never accepted in request payloads.

telemetry_config TelemetryConfig

Customer-supplied telemetry configuration for exporting container logs, traces, and metrics.

endpoints TelemetryEndpoint[] obligatoire

Customer-supplied telemetry export endpoint configurations.

session_configuration SessionConfiguration

Session defaults applied to sessions created for a hosted agent version.

idle_timeout_seconds integer

The idle duration, in seconds, before a session's sandbox is suspended. Optional — when unset, the server default of 900 seconds is used. Must be between 120 and 3600 seconds (inclusive).

prompt PromptAgentDefinition

The prompt agent definition

kind enum obligatoire
prompt
harness github_copilot_preview

A managed runtime and agent loop used to execute a prompt agent.

Celui-ci peut avoir l'une des valeurs suivantes :
github_copilot_preview GitHubCopilotHarness

The GitHub Copilot managed harness for prompt agents.

type enum obligatoire

The type of managed harness. Always github_copilot_preview.

github_copilot_preview
model string obligatoire

The model deployment to use for this agent.

instructions string | null

A system (or developer) message inserted into the model's context.

skills SkillReference[]

The Foundry skills available to this prompt agent. An omitted skill version is resolved and pinned when the agent version is created.

temperature number | null

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. Defaults to 1.

top_p number | null

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. Defaults to 1.

reasoning OpenAI.Reasoning | null

Configuration options for reasoning models.

mode string | enum
Un des éléments suivants :
string
enum
standardpro
effort string | enum | null

Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, xhigh, and max. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the reasoning guide for model-specific support.

Un des éléments suivants :
string
enum
noneminimallowmediumhighxhighmax
summary enum
autoconcisedetailed
context enum
autocurrent_turnall_turns
generate_summary enum
autoconcisedetailed
tools OpenAI.Tool[]

An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter.

tool_choice string | OpenAI.ToolChoiceParam

How the model should select which tool (or tools) to use when generating a response. See the tools parameter to see how to specify which tools the model can call.

Un des éléments suivants :
string
Celui-ci peut avoir l'une des valeurs suivantes :
function OpenAI.ToolChoiceFunction

Use this option to force the model to call a specific function.

type enum obligatoire

For function calling, the type is always function.

function
name string obligatoire

The name of the function to call.

mcp OpenAI.ToolChoiceMCP

Use this option to force the model to call a specific tool on a remote MCP server.

type enum obligatoire

For MCP tools, the type is always mcp.

mcp
server_label string obligatoire

The label of the MCP server to use.

name string | null
allowed_tools OpenAI.ToolChoiceAllowed

Constrains the tools available to the model to a pre-defined set.

type enum obligatoire

Allowed tool configuration type. Always allowed_tools.

allowed_tools
mode enum obligatoire

Constrains the tools available to the model to a pre-defined set. auto allows the model to pick from among the allowed tools and generate a message. required requires the model to call one or more of the allowed tools.

autorequired
tools object[] obligatoire

A list of tool definitions that the model should be allowed to call. For the Responses API, the list of tool definitions might look like: json [ { "type": "function", "name": "get_weather" }, { "type": "mcp", "server_label": "deepwiki" }, { "type": "image_generation" } ]

custom OpenAI.ToolChoiceCustom

Use this option to force the model to call a specific custom tool.

type enum obligatoire

For custom tool calling, the type is always custom.

custom
name string obligatoire

The name of the custom tool to call.

programmatic_tool_calling OpenAI.SpecificProgrammaticToolCallingParam
type enum obligatoire

The tool to call. Always programmatic_tool_calling.

programmatic_tool_calling
apply_patch OpenAI.SpecificApplyPatchParam

Forces the model to call the apply_patch tool when executing a tool call.

type enum obligatoire

The tool to call. Always apply_patch.

apply_patch
shell OpenAI.SpecificFunctionShellParam

Forces the model to call the shell tool when a tool call is required.

type enum obligatoire

The tool to call. Always shell.

shell
file_search OpenAI.ToolChoiceFileSearch

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
file_search
web_search_preview OpenAI.ToolChoiceWebSearchPreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
web_search_preview
computer_use_preview OpenAI.ToolChoiceComputerUsePreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
computer_use_preview
web_search_preview_2025_03_11 OpenAI.ToolChoiceWebSearchPreview20250311

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
web_search_preview_2025_03_11
image_generation OpenAI.ToolChoiceImageGeneration

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
image_generation
code_interpreter OpenAI.ToolChoiceCodeInterpreter

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
code_interpreter
computer OpenAI.ToolChoiceComputer

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
computer
computer_use OpenAI.ToolChoiceComputerUse

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obligatoire
computer_use
text PromptAgentDefinitionTextOptions

Configuration options for a text response from the model. Can be plain text or structured JSON data.

format json_schema | text | json_object

An object specifying the format that the model must output. Configuring { "type": "json_schema" } enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. The default format is { "type": "text" } with no additional options. Not recommended for gpt-4o and newer models:* Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it.

Celui-ci peut avoir l'une des valeurs suivantes :
json_schema OpenAI.TextResponseFormatJsonSchema

JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.

type enum obligatoire

The type of response format being defined. Always json_schema.

json_schema
description string

A description of what the response format is for, used by the model to determine how to respond in the format.

name string obligatoire

The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.

schema OpenAI.ResponseFormatJsonSchemaSchema obligatoire

The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.

strict boolean | null
text OpenAI.TextResponseFormatConfigurationResponseFormatText

Default response format. Used to generate text responses.

type enum obligatoire

The type of response format being defined. Always text.

text
json_object OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject

JSON object response format. An older method of generating JSON responses. Using json_schema is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.

type enum obligatoire

The type of response format being defined. Always json_object.

json_object
structured_inputs object

Set of structured inputs that can participate in prompt template substitution or tool argument bindings.

[key: string] StructuredInputDefinition

An structured input that can participate in prompt template substitutions and tool argument binding.

description string

A human-readable description of the input.

default_value StructuredInputDefinition

The default value for the input if no run-time value is provided.

schema object

The JSON schema for the structured input (optional).

required boolean

Whether the input property is required when the agent is invoked. The service defaults to false if a value is not specified by the caller.

workflow WorkflowAgentDefinition

The workflow agent definition. Microsoft Foundry is retiring workflows on December 1, 2026. If you're looking to build new workflows, use Microsoft Agent Framework. To migrate existing workflows, see the Migration guide.

kind enum obligatoire
workflow
workflow string

The CSDL YAML definition of the workflow.

external ExternalAgentDefinition

The external agent definition. Represents a third-party agent hosted outside Foundry (for example, on GCP or AWS). Registration is metadata-only: Foundry records the agent definition to light up observability experiences (traces, evaluations) over customer-emitted OpenTelemetry data.

kind enum obligatoire
external
otel_agent_id string

The OpenTelemetry agent identifier used to attribute customer-emitted spans to this Foundry agent. Spans must include the attribute gen_ai.agent.id = <otel_agent_id> to appear under this registration. Defaults to the top-level agent name when omitted. Provide an explicit value only for migration scenarios where the running external agent already emits a stable id that differs from the Foundry agent name. The resolved value is always echoed on read.

voice VoiceAgentDefinition

The voice agent definition. Its configuration (model, instructions, audio, tools, and optional avatar) drives a managed speech-to-speech experience. Establish realtime voice sessions through GET /agents/{agent_name}/endpoint/protocols/voice. Every create or update produces a new immutable version.

kind enum obligatoire

The kind discriminator for a voice agent definition. Always voice.

voice
model_type string | enum

How the model backing a voice agent is served. This is independent of the architecture (realtime or cascaded), which the service derives from the selected model.

Un des éléments suivants :
string
enum
managedself_deployed
model string

The model to use for this agent. Required with model_type for a model-backed voice agent and omitted when conversation_engine is provided. The model must support realtime or cascaded voice.

conversation_engine hosted_agent

An engine that owns conversation handling for a voice agent.

Celui-ci peut avoir l'une des valeurs suivantes :
hosted_agent VoiceHostedAgentConversationEngine

A closed reference to the hosted text agent that owns conversation handling for a voice agent. The hosted agent is resolved within the same project and must support the invocations_ws protocol, Voice Live compatibility, and Bridge Protocol 1.0.

type enum obligatoire

Selects a hosted Foundry agent as the conversation engine.

hosted_agent
name string obligatoire

The non-empty DNS-like name of the target hosted text agent in the same project.

version string

The target agent version. Omit this property to select the latest version when the voice session starts. When supplied, use a positive integer or draft-{positive-unix-timestamp} whose numeric component fits in a signed 64-bit integer.

instructions string

A system (or developer) message inserted into the model's context. Supports template substitution via structured_inputs, rendered per session before the live session starts.

greeting template | llm_generated

Session-start greeting configuration for a voice agent.

Celui-ci peut avoir l'une des valeurs suivantes :
template VoiceAgentTemplateGreetingConfig

A deterministic greeting rendered with the voice agent's structured inputs and synthesized without model-authored generation.

type enum obligatoire
template
text string obligatoire

The Handlebars text template spoken at session start.

llm_generated VoiceAgentLlmGeneratedGreetingConfig

A greeting authored by the session model from a scoped opening-turn prompt.

type enum obligatoire
llm_generated
prompt string obligatoire

The Handlebars prompt that guides the opening turn.

tool_choice enum | OpenAI.ToolChoiceFunction | OpenAI.ToolChoiceMCP

Tool-selection behavior for a voice agent.

Celui-ci peut avoir l'une des valeurs suivantes :
enum
noneautorequired
type enum obligatoire

For function calling, the type is always function.

function
name string obligatoire

The name of the function to call.

type enum obligatoire

For MCP tools, the type is always mcp.

mcp
server_label string obligatoire

The label of the MCP server to use.

name string | null
audio VoiceAgentAudioConfig

The audio configuration for a voice agent. These values are session defaults and may be overridden when connecting.

input VoiceAgentAudioInputConfig

Input audio configuration for a voice agent.

format audio/pcm | audio/pcmu | audio/pcma
Celui-ci peut avoir l'une des valeurs suivantes :
audio/pcm OpenAI.RealtimeAudioFormatsAudioPcm
type enum obligatoire
audio/pcm
rate enum
24000
audio/pcmu OpenAI.RealtimeAudioFormatsAudioPcmu
type enum obligatoire
audio/pcmu
audio/pcma OpenAI.RealtimeAudioFormatsAudioPcma
type enum obligatoire
audio/pcma
noise_reduction VoiceAgentNoiseReduction | null

Input noise reduction. Set to null to disable.

type string | enum obligatoire

The input audio noise reduction mode.

Un des éléments suivants :
string
enum
near_fieldfar_fieldazure_deep_noise_suppression
turn_detection server_vad | azure_semantic_vad | azure_semantic_vad_en | azure_semantic_vad_multilingual | semantic_vad | null

Turn (end-of-speech) detection. Server-side turn detection is enabled by default; set to null to disable it, in which case the client must trigger responses manually.

Celui-ci peut avoir l'une des valeurs suivantes :
server_vad VoiceAgentServerVadTurnDetection

Server-side voice activity detection.

threshold number
prefix_padding_ms integer
silence_duration_ms integer
create_response boolean
interrupt_response boolean
idle_timeout_ms integer | null
type enum obligatoire
server_vad
speech_duration_ms integer

A duration encoded as an integer number of milliseconds.

end_of_utterance_detection VoiceAgentEndOfUtteranceDetection | null

Semantic end-of-utterance detection configuration. Set to null to disable it.

model string | enum obligatoire

The semantic end-of-utterance detection model.

Un des éléments suivants :
string
enum
semantic_detection_v1semantic_detection_v1_ensemantic_detection_v1_multilingualsmart_end_of_turn_detection
threshold_level string | enum

The sensitivity threshold for semantic end-of-utterance detection.

Un des éléments suivants :
string
enum
lowmediumhighdefault
timeout_ms integer

A duration encoded as an integer number of milliseconds.

azure_semantic_vad VoiceAgentAzureSemanticVadTurnDetection

Azure semantic voice activity detection.

type enum obligatoire
azure_semantic_vad
threshold number

Activation threshold for voice activity detection, from 0 to 1.

prefix_padding_ms integer

A duration encoded as an integer number of milliseconds.

silence_duration_ms integer

A duration encoded as an integer number of milliseconds.

idle_timeout_ms integer

A duration encoded as an integer number of milliseconds.

end_of_utterance_detection VoiceAgentEndOfUtteranceDetection | null

Semantic end-of-utterance detection configuration. Set to null to disable it.

model string | enum obligatoire

The semantic end-of-utterance detection model.

Un des éléments suivants :
string
enum
semantic_detection_v1semantic_detection_v1_ensemantic_detection_v1_multilingualsmart_end_of_turn_detection
threshold_level string | enum

The sensitivity threshold for semantic end-of-utterance detection.

Un des éléments suivants :
string
enum
lowmediumhighdefault
timeout_ms integer

A duration encoded as an integer number of milliseconds.

speech_duration_ms integer

A duration encoded as an integer number of milliseconds.

remove_filler_words boolean

Whether filler words are removed from transcription.

create_response boolean

Whether a response is created automatically when speech stops.

interrupt_response boolean

Whether user speech may interrupt the agent's response.

languages string[]

BCP-47 language codes used for speech detection.

azure_semantic_vad_en VoiceAgentAzureSemanticVadEnTurnDetection

English-optimized Azure semantic voice activity detection.

type enum obligatoire
azure_semantic_vad_en
threshold number

Activation threshold for voice activity detection, from 0 to 1.

prefix_padding_ms integer

A duration encoded as an integer number of milliseconds.

silence_duration_ms integer

A duration encoded as an integer number of milliseconds.

idle_timeout_ms integer

A duration encoded as an integer number of milliseconds.

end_of_utterance_detection VoiceAgentEndOfUtteranceDetection | null

Semantic end-of-utterance detection configuration. Set to null to disable it.

model string | enum obligatoire

The semantic end-of-utterance detection model.

Un des éléments suivants :
string
enum
semantic_detection_v1semantic_detection_v1_ensemantic_detection_v1_multilingualsmart_end_of_turn_detection
threshold_level string | enum

The sensitivity threshold for semantic end-of-utterance detection.

Un des éléments suivants :
string
enum
lowmediumhighdefault
timeout_ms integer

A duration encoded as an integer number of milliseconds.

speech_duration_ms integer

A duration encoded as an integer number of milliseconds.

remove_filler_words boolean

Whether filler words are removed from transcription.

create_response boolean

Whether a response is created automatically when speech stops.

interrupt_response boolean

Whether user speech may interrupt the agent's response.

azure_semantic_vad_multilingual VoiceAgentAzureSemanticVadMultilingualTurnDetection

Multilingual Azure semantic voice activity detection.

type enum obligatoire
azure_semantic_vad_multilingual
threshold number

Activation threshold for voice activity detection, from 0 to 1.

prefix_padding_ms integer

A duration encoded as an integer number of milliseconds.

silence_duration_ms integer

A duration encoded as an integer number of milliseconds.

idle_timeout_ms integer

A duration encoded as an integer number of milliseconds.

end_of_utterance_detection VoiceAgentEndOfUtteranceDetection | null

Semantic end-of-utterance detection configuration. Set to null to disable it.

model string | enum obligatoire

The semantic end-of-utterance detection model.

Un des éléments suivants :
string
enum
semantic_detection_v1semantic_detection_v1_ensemantic_detection_v1_multilingualsmart_end_of_turn_detection
threshold_level string | enum

The sensitivity threshold for semantic end-of-utterance detection.

Un des éléments suivants :
string
enum
lowmediumhighdefault
timeout_ms integer

A duration encoded as an integer number of milliseconds.

speech_duration_ms integer

A duration encoded as an integer number of milliseconds.

remove_filler_words boolean

Whether filler words are removed from transcription.

create_response boolean

Whether a response is created automatically when speech stops.

interrupt_response boolean

Whether user speech may interrupt the agent's response.

languages string[]

BCP-47 language codes used for speech detection.

semantic_vad VoiceAgentSemanticVadTurnDetection

OpenAI semantic VAD turn-detection settings.

eagerness enum
lowmediumhighauto
create_response boolean
interrupt_response boolean
type enum obligatoire
semantic_vad
echo_cancellation VoiceAgentEchoCancellation | null

Optional server-side echo cancellation settings.

type enum obligatoire

The echo cancellation implementation. Always server_echo_cancellation.

server_echo_cancellation
reference_source enum

The source of reference audio used for echo cancellation.

serverclient
channels integer

The number of input channels. Use two interleaved channels when reference_source is client.

transcription VoiceAgentInputTranscription | null

Asynchronous input-audio transcription. Set to null to disable transcription.

language string

The language of the input audio. Supplying the input language in ISO-639-1 (e.g. en) format will improve accuracy and latency.

languages string[]

Possible languages of the input audio, in ISO-639-1 format. Supported by gpt-transcribe and gpt-live-transcribe.

keywords string[]

Words or phrases to guide transcription of the input audio. Supported by gpt-transcribe and gpt-live-transcribe.

prompt string

An optional text to guide the model's style or continue a previous audio segment. For whisper-1, the prompt is a list of keywords. For gpt-4o-transcribe models (excluding gpt-4o-transcribe-diarize), the prompt is a free text string, for example "expect words related to technology". Prompt is not supported with gpt-realtime-whisper in GA Realtime sessions.

delay enum

Controls how long the model waits before emitting transcription text. Higher values can improve transcription accuracy at the cost of latency. Only supported with gpt-realtime-whisper in GA Realtime sessions.

minimallowmediumhighxhigh
model string | enum obligatoire

The input-audio transcription model identifier. This is a model name, not a Foundry deployment name. Mirrors the transcription models supported by the managed voice backend, covering the OpenAI Realtime transcription models plus the Azure and MAI models. Additional values may be added over time.

Un des éléments suivants :
string
enum
whisper-1gpt-realtime-whispergpt-4o-transcribegpt-4o-mini-transcribegpt-4o-transcribe-diarizegpt-transcribegpt-live-transcribemai-transcribeazure-speech
custom_speech object

Optional customer custom speech deployment configuration, keyed by locale.

[key: string] string
phrase_list string[]

Optional phrase hints that bias recognition toward domain terms.

output VoiceAgentAudioOutputConfig

Output audio configuration for a voice agent. Provider-specific fields are selected by voice_type: - openai: voice and speed. - azure-standard: voice, voice_locale, speed, voice_temperature, custom_lexicon_url, custom_text_normalization_url, prefer_locales, style, pitch, and volume. - azure-custom: all azure-standard fields except style, plus custom_voice_endpoint_id. - azure-personal: all azure-standard fields except style, plus personal_voice_model. - avatar-voice-sync: all azure-standard fields except voice and style, plus personal_voice_model; the voice name is derived from the avatar. - azure-realtime-native: voice and speed. format and output_audio_timestamp_types apply to every voice type.

format audio/pcm | audio/pcmu | audio/pcma
Celui-ci peut avoir l'une des valeurs suivantes :
audio/pcm OpenAI.RealtimeAudioFormatsAudioPcm
type enum obligatoire
audio/pcm
rate enum
24000
audio/pcmu OpenAI.RealtimeAudioFormatsAudioPcmu
type enum obligatoire
audio/pcmu
audio/pcma OpenAI.RealtimeAudioFormatsAudioPcma
type enum obligatoire
audio/pcma
voice string

The voice name or identifier. Applies to openai, azure-standard, azure-custom, azure-personal, and azure-realtime-native. It does not apply to avatar-voice-sync, which derives the voice name from the avatar.

voice_type string | enum

The voice implementation. Additional values may be added over time.

Un des éléments suivants :
string
enum
openaiazure-standardazure-customazure-personalavatar-voice-syncazure-realtime-native
voice_locale string

The enforced BCP-47 output locale. Applies to azure-standard, azure-custom, azure-personal, and avatar-voice-sync.

speed number

The numeric output speed multiplier. Applies to all known voice_type values and defaults to 1.

voice_temperature number

The voice variation temperature. Applies to azure-standard, azure-custom, azure-personal, and avatar-voice-sync.

custom_lexicon_url string

The URL of a custom pronunciation lexicon. Applies to azure-standard, azure-custom, azure-personal, and avatar-voice-sync.

custom_text_normalization_url string

The URL of a custom text-normalization configuration. Applies to azure-standard, azure-custom, azure-personal, and avatar-voice-sync.

prefer_locales string[]

Preferred BCP-47 locales for multilingual synthesis. Applies to azure-standard, azure-custom, azure-personal, and avatar-voice-sync.

style string

The voice speaking style. Applies only when voice_type is azure-standard.

pitch string

The voice pitch adjustment. Applies to azure-standard, azure-custom, azure-personal, and avatar-voice-sync.

volume string

The voice volume adjustment. Applies to azure-standard, azure-custom, azure-personal, and avatar-voice-sync.

custom_voice_endpoint_id string

The Azure custom-voice deployment endpoint identifier. Applies only when voice_type is azure-custom.

personal_voice_model string

The Azure personal or avatar voice model. Applies only when voice_type is azure-personal or avatar-voice-sync.

output_audio_timestamp_types enum[]

Timestamp kinds to include with output audio. Applies to every voice_type.

output_modalities VoiceOutputModality[]

The output modalities the agent produces. Defaults to ["audio"]. animation and avatar are available when an avatar is configured.

max_output_tokens integer | enum

The maximum output-token count or the literal inf.

Un des éléments suivants :
integer
enum
inf
include enum[]

Additional fields to include in service outputs.

interim_response static_interim_response | llm_interim_response

Fields shared by interim-response configurations.

Celui-ci peut avoir l'une des valeurs suivantes :
static_interim_response VoiceAgentStaticInterimResponseConfig

A static interim response selected from configured text.

type enum obligatoire
static_interim_response
texts string[]

Candidate text values for the interim response.

llm_interim_response VoiceAgentLlmInterimResponseConfig

An interim response generated by a language model.

type enum obligatoire
llm_interim_response
model string

The model used to generate interim responses.

instructions string

Optional instructions for generating interim responses.

max_completion_tokens integer

The maximum completion-token count for an interim response.

avatar VoiceAgentAvatarConfig

Avatar configuration for a voice agent. These values are session defaults and may be overridden when connecting.

type string | enum obligatoire

The avatar type.

Un des éléments suivants :
string
enum
video_avatarphoto_avatar
character string obligatoire

The avatar character identifier, e.g. 'lisa'.

style string

The avatar style, e.g. 'casual-sitting'.

customized boolean

Whether the avatar is a customer-customized avatar. Defaults to false.

output_protocol string | enum

The transport used to deliver the avatar video stream.

Un des éléments suivants :
string
enum
webrtcwebsocket
model string

The avatar model identifier.

video VoiceAgentAvatarVideoParams

Avatar video encoder and presentation settings.

bitrate integer

The target video bitrate in bits per second.

crop VoiceAgentAvatarVideoCrop

The rectangular crop applied to avatar video.

bottom_right integer[] obligatoire
top_left integer[] obligatoire
resolution VoiceAgentAvatarVideoResolution

The avatar video resolution.

width integer obligatoire
height integer obligatoire
background VoiceAgentAvatarVideoBackground

The avatar video background.

image_url string
color string
gop_size integer
scene VoiceAgentAvatarScene

Avatar placement and motion settings.

zoom number
position_x number
position_y number
rotation_x number
rotation_y number
rotation_z number
amplitude number
output_audit_audio boolean

Whether audit audio is emitted with avatar output. Defaults to false.

tools VoiceAgentTool[]

The tools the voice agent may use. Supported tool kinds are function (executed by the client), mcp, system (service-managed session controls), and toolbox. Server-side tools such as web_search, azure_ai_search, and openapi are provided through a toolbox rather than declared directly.

tool_choice enum | OpenAI.ToolChoiceFunction | OpenAI.ToolChoiceMCP

Tool-selection behavior for a voice agent.

Celui-ci peut avoir l'une des valeurs suivantes :
enum
noneautorequired
type enum obligatoire

For function calling, the type is always function.

function
name string obligatoire

The name of the function to call.

type enum obligatoire

For MCP tools, the type is always mcp.

mcp
server_label string obligatoire

The label of the MCP server to use.

name string | null
parallel_tool_calls boolean

Whether the model may call multiple tools in parallel.

structured_inputs object

Set of structured inputs that participate in prompt template substitution, rendered per session before the live session starts.

[key: string] StructuredInputDefinition

An structured input that can participate in prompt template substitutions and tool argument binding.

description string

A human-readable description of the input.

default_value StructuredInputDefinition

The default value for the input if no run-time value is provided.

schema object

The JSON schema for the structured input (optional).

required boolean

Whether the input property is required when the agent is invoked. The service defaults to false if a value is not specified by the caller.

subagent_config VoiceAgentSubagentConfig

Configuration for sibling Foundry text agents that a voice agent may consult.

subagents VoiceAgentSubagent[] obligatoire

The sibling Foundry text agents, in the same project, that this voice agent may consult.

store boolean

Whether conversations with this agent are persisted. A single, all-or-nothing persistence switch that defaults to false (privacy-safe: off by default). When true, Foundry persists the full conversation — the transcript/event timeline and raw audio. When false, nothing is persisted and no conversation is surfaced. There is no separate audio-logging control; audio is persisted only as part of this switch. Latency/performance telemetry (e.g. time-to-first-audio, inter-token latency, interruption) is observability-only (customer trace / App Insights) and is not part of the persisted conversation content.

draft boolean

Whether this agent version is a draft (candidate) rather than a release. Draft versions are recorded but excluded from default 'latest' resolution and are not auto-promoted. Defaults to false.

status enum

The provisioning status of an agent version.

creatingactivefaileddeletingdeleted
instance_identity AgentIdentity
principal_id string obligatoire

The principal ID of the agent instance

client_id string obligatoire

The client ID of the agent instance. Also referred to as the instance ID

status string | enum

The status of an agent identity, applicable to both the agent instance identity and the agent blueprint.

Un des éléments suivants :
string
enum
activedisabled
blueprint AgentIdentity
principal_id string obligatoire

The principal ID of the agent instance

client_id string obligatoire

The client ID of the agent instance. Also referred to as the instance ID

status string | enum

The status of an agent identity, applicable to both the agent instance identity and the agent blueprint.

Un des éléments suivants :
string
enum
activedisabled
blueprint_reference ManagedAgentIdentityBlueprint
Celui-ci peut avoir l'une des valeurs suivantes :
ManagedAgentIdentityBlueprint ManagedAgentIdentityBlueprintReference
type enum obligatoire
ManagedAgentIdentityBlueprint
blueprint_id string obligatoire

The ID of the managed blueprint

agent_guid string

The unique GUID identifier of the agent.

agent_endpoint AgentEndpointConfig
version_selector VersionSelector
version_selection_rules VersionSelectionRule[] obligatoire
protocol_configuration ProtocolConfiguration

Per-protocol configuration for the agent endpoint.

activity ActivityProtocolConfiguration

Configuration specific to the activity protocol.

enable_m365_public_endpoint boolean

Whether to enable the M365 public endpoint for the activity protocol.

access_boundaries ActivityProtocolAccessBoundary[]

The access boundaries for the activity protocol.

responses ResponsesProtocolConfiguration

Configuration specific to the responses protocol.

a2a A2AProtocolConfiguration

Configuration specific to the A2A protocol.

mcp McpProtocolConfiguration

Configuration specific to the MCP protocol.

invocations InvocationsProtocolConfiguration

Configuration specific to the invocations protocol.

invocations_ws InvocationsWsProtocolConfiguration

Configuration specific to the WebSocket-based invocations protocol.

authorization_schemes AgentEndpointAuthorizationScheme[]

The authorization schemes supported by the agent endpoint

publish_approval_status string | enum

The Microsoft Agent Certification review status of the Microsoft 365 store title published for an agent.

Un des éléments suivants :
string
enum
not_publishedpendingapprovedrejectedno_approval_needed
digital_worker_type string | enum

The type of digital worker.

Un des éléments suivants :
string
enum
m365
instance_identity AgentIdentity
principal_id string obligatoire

The principal ID of the agent instance

client_id string obligatoire

The client ID of the agent instance. Also referred to as the instance ID

status string | enum

The status of an agent identity, applicable to both the agent instance identity and the agent blueprint.

Un des éléments suivants :
string
enum
activedisabled
blueprint AgentIdentity
principal_id string obligatoire

The principal ID of the agent instance

client_id string obligatoire

The client ID of the agent instance. Also referred to as the instance ID

status string | enum

The status of an agent identity, applicable to both the agent instance identity and the agent blueprint.

Un des éléments suivants :
string
enum
activedisabled
blueprint_reference ManagedAgentIdentityBlueprint
Celui-ci peut avoir l'une des valeurs suivantes :
ManagedAgentIdentityBlueprint ManagedAgentIdentityBlueprintReference
type enum obligatoire
ManagedAgentIdentityBlueprint
blueprint_id string obligatoire

The ID of the managed blueprint

agent_card AgentCard
version string obligatoire

The version of the agent card.

description string

The description of the agent card.

skills AgentCardSkill[] obligatoire

The set of skills that an agent can perform.

Client error

Corps

Content-Type: application/json
error OpenAI.Error obligatoire
code string | null obligatoire
message string obligatoire
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Un des éléments suivants :
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string obligatoire

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Server error

Corps

Content-Type: application/json
error OpenAI.Error obligatoire
code string | null obligatoire
message string obligatoire
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Un des éléments suivants :
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string obligatoire

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Requête

POST /agents HTTP/1.1

Response

Status: 200
Content-Type: application/json
Status: 4XX
Content-Type: application/json
Status: 5XX
Content-Type: application/json
fr-fr
Vos choix en matière de confidentialité
  • Clause d’exclusion de responsabilité sur l’IA
  • Versions antérieures
  • Blog
  • Collaboration
  • Confidentialité
  • Confidentialité de la santé des consommateurs
  • Conditions d’utilisation
  • Accessibilité
  • Marques
  • © Microsoft 2026