The Mirage API lets you process AI inference tasks on-demand.
While integrating the REST API, you may be interested in the following guides:
Transcribein Tasks
Get Transcribe Languages
List all languages that are available for transcription.
Map of supported locale codes
- GEThttps://api.mirage-ai.com/v1/task/transcribe/languages
(loading)
(loading)
Transcribe Speech
Transcribe speech from an audio file to text.
Can be set to stream the response using SSE
Locales to transcribe between
Locale code to transcribe to
Media file to transcribe
URL of the audio file to be transcribed
Media file MIME type
- POSThttps://api.mirage-ai.com/v1/task/transcribe/speech
(loading)
(loading)
Answerin Tasks
Answer Prompt
Answer a given prompt.
Question to generate an answer against
Answer generation options
Maximum number of tokens in the generated answer (from 0
to 4000
)
Temperature of the inference (from 0.0
to 1.0
)
JSON schema to customize output format of answer
Model size (small
is faster, large
is more qualitative)
Values
small
medium
large
- POSThttps://api.mirage-ai.com/v1/task/answer/prompt
(loading)
(loading)
Answer Question
Answer a given question using previously indexed data.
Can be set to stream the response using SSE
Question to generate an answer against
Answer generation options
Start of answer text (answer text prefix)
System prompt used to generate the answer (eg. Speak in a friendly way
)
Quality threshold of generated answer (in percent, from 0
to 100
)
Maximum number of tokens in the generated answer (from 0
to 4000
)
Temperature of the inference (from 0.0
to 1.0
)
Locales to answer between
Locale code to answer from
Context data used to enrich answering
Source tag for the ingested item (eg. helpdesk
)
Primary identifier (eg. team identifier)
Advanced filters (note that simple filters override advanced filters if they collide)
Filter on secondary identifier
Included values
Excluded values
Filter on tertiary identifier
Included values
Excluded values
Filter on source identifier
Included values
Excluded values
Curent conversation
List of messages for conversation
Message sender
Values
customer
agent
Message text
Model size (small
is faster, large
is more qualitative)
Values
small
medium
large
- POSThttps://api.mirage-ai.com/v1/task/answer/question
(loading)
(loading)
Summarizein Tasks
Summarize Paragraphs
Summarize given paragraphs.
Locales for summarization
Locale code to generate the summary into
List of paragraphs to summarize
Paragraph text
- POSThttps://api.mirage-ai.com/v1/task/summarize/paragraphs
(loading)
(loading)
Summarize Conversation
Summarize a given conversation, from a list of messages.
Locales for summarization
Locale code to generate the summary into
Transcript of conversation to summarize
Message sender name
Message text
- POSThttps://api.mirage-ai.com/v1/task/summarize/conversation
(loading)
(loading)
Categorizein Tasks
Categorize Conversations
Categorize multiple conversations, from a list of messages for each individual conversation.
Conversations to categorize
Transcript of conversation to categorize
Message sender
Values
customer
agent
Message text
- POSThttps://api.mirage-ai.com/v1/task/categorize/conversations
(loading)
(loading)
Rankin Tasks
Rank Question
Ranks results based on a given question.
Question to generate ranked results against
Context data used to rank results
Source tag for the ingested item (eg. helpdesk
, required either through simple or advanced filters)
Primary identifier (eg. team identifier)
Advanced filters (note that simple filters override advanced filters if they collide)
Filter on secondary identifier
Included values
Excluded values
Filter on tertiary identifier
Included values
Excluded values
Filter on source identifier
Included values
Excluded values
- POSThttps://api.mirage-ai.com/v1/task/rank/question
(loading)
(loading)
Translatein Tasks
Get Translate Languages
List all languages that are available for translation.
Map of supported locale codes
- GEThttps://api.mirage-ai.com/v1/task/translate/languages
(loading)
(loading)
Translate Text
Translate a provided text between two languages.
💡 Note that it is possible to ignore translation for certain parts of the text, by enclosing the text to keep pristine in a <span translate="no"></span>
tag. If using such do-not-translate tags, it is required that the type
marker is set to html
.
Locales to translate between
Locale code to translate from
Locale code to translate to
Type of content to translate
Values
plain
html
Text to translate
- POSThttps://api.mirage-ai.com/v1/task/translate/text
(loading)
(loading)
Fraudin Tasks
Fraud Spamicity
Fraud check classification on scammy websites using a website name, domain and email domain.
💡 Note that it is recommended to use the output score. When is_fraud
is positive, safe fraud threshold is between 0.95
and 0.97
.
Website name
Website domain
Email domain
- POSThttps://api.mirage-ai.com/v1/task/fraud/spamicity
(loading)
(loading)
Contextin Data
Ingest Context Data
Ingest context data into account. This will be used eg. when answering a question.
Items to be ingested
Item operation (defaults to index
)
Values
index
reindex
delete
Primary identifier for the item
Secondary identifier for the item
Tertiary identifier for the item
Text content for the item
Timestamp for the item (UNIX format, in milliseconds)
Source tag for the item (eg. chat
)
Optional metadata to store alongside the item
- POSThttps://api.mirage-ai.com/v1/data/context/ingest
(loading)
(loading)