Skip to main content

EVA Gateway Parameters

This page describes the APIs and parameters for each type of model available through EVA Gateway. If you are getting started, see the EVA Gateway Integration Guide first.


General Conventions​

  • See the model details in the Model Hub for model IDs, supported parameters, value ranges, and capabilities. Use the EVA model IDs shown there in your requests.
  • The three capabilities use different path prefixes: /llm/v1 for LLM, and /v1 for ASR and TTS.
  • All requests require authentication with Authorization: Bearer <API_KEY>.
  • EVA Gateway automatically generates a Trace ID for every request and returns it in the autoark-trace-id response header.

LLM​

LLM request bodies, response bodies, and errors follow the standard OpenAI format for a consistent interface across models.

Supported parameters, value ranges, and capabilities vary by LLM model. See the relevant model details in the Model Hub.

Supported Endpoints and Parameters​

  • POST /llm/v1/chat/completions: Chat Completions
  • POST /llm/v1/responses: Responses

ASR​

The speech recognition endpoint is POST /v1/audio/transcriptions. Requests use multipart/form-data.

Parameters​

ParameterTypeRequiredDefaultDescription
filefileYes—Audio file.
modelstringYes—ASR model ID.
audio_formatstringNoInferred from the filename extensionIf omitted, inferred as wav for filenames ending in .wav, and pcm otherwise. Supported formats vary by model; see the relevant model details in the Model Hub.
sample_rateintYes—Sample rate of the input audio in Hz. Must be a positive integer.
channelsintNo1Number of audio channels.
hotwordsstringNo—Comma-separated hotwords, such as AutoArk,EVA. Support varies by model; see the relevant model details in the Model Hub. Models that do not support this parameter silently ignore it.
streamboolNofalseSet to true to receive an SSE stream. See Streaming Responses below.
provider_paramsstringNo—A JSON string for model-specific native parameters not covered above. If the same parameter is also set through a field above, the value in provider_params takes precedence, except for model.

When using the OpenAI SDK, pass audio_format, sample_rate, channels, hotwords, and provider_params through extra_body in Python or additional fields in TypeScript.

Response​

{
"text": "Recognized text",
"usage": {
"duration": 8767, // Unit: ms
},
"credit": 123, // Credits consumed by this request
}

Model-Specific Parameters​

Supported audio formats, sample rates, hotwords, and other parameters vary by ASR model. See the relevant model details in the Model Hub.

Streaming Responses​

When stream=true, the endpoint returns an SSE stream (text/event-stream):

data: {"type":"transcript.text.delta","delta":"..."} (zero or more events)
data: {"type":"transcript.text.done","text":"Full transcript","usage":{"duration":8767},"credit":123}
data: [DONE]
  • The contents of delta vary by model. Some models return the full transcript so far in each delta; others return only newly recognized text. See the relevant model details in the Model Hub.
  • For all models, text in transcript.text.done contains the complete result and should be treated as authoritative. Full-transcript delta values overlap and must not be concatenated directly.

TTS​

The text-to-speech endpoint is POST /v1/audio/speech. Requests use application/json.

Parameters​

ParameterTypeRequiredDefaultDescription
modelstringYes—TTS model ID.
inputstringYes—Text to synthesize. Length limits vary by model; see the relevant model details in the Model Hub.
voicestringNoModel-dependentVoice ID. See the relevant model details in the Model Hub for available voices. If omitted, the default voice is used.
response_formatstringNopcmOutput audio format. Available formats vary by model; see the relevant model details in the Model Hub.
speeddoubleNoModel-dependentSpeech rate. Accepted ranges vary by model.
volumedoubleNoModel-dependentVolume. Accepted ranges vary by model.
sample_rateintNoModel-dependentSample rate in Hz.
pitch_ratedoubleNoModel-dependentPitch adjustment. Not supported by all models.
stream_formatstringNoaudioaudio returns raw audio bytes; sse returns an SSE event stream. See Streaming Responses below.
provider_paramsstringNo—A JSON string for model-specific native parameters not covered above. If the same parameter is also set through a field above, the value in provider_params takes precedence, except for model. Preserve the nested structure of any nested native parameters.

Gateway extensions: volume, sample_rate, pitch_rate, and provider_params are Gateway extensions, not native fields of OpenAI's /v1/audio/speech API. When using the OpenAI SDK, pass them through extra_body in Python or additional fields in TypeScript.

Model-Specific Parameters​

Supported voices, output formats, sample rates, and ranges for speed, volume, and pitch vary by TTS model. See the relevant model details in the Model Hub.

Streaming Responses​

When stream_format=sse, the endpoint returns an SSE stream (text/event-stream) with these events:

data: {"type":"speech.audio.delta","audio":"<BASE64_AUDIO>"}
data: {"type":"speech.audio.done"}

The default stream_format is audio, which returns raw audio bytes directly.