API Reference
Welcome to Delos API Reference. Try and develop using the smartest Orchestration Models, which unleash:
- LLM chatting, streaming and embedding
- Translation Models
- Web Models
- Files Parsing and Querying
- Vision (to come)
Here you will find the code to directly reach our API endpoints, and you can also use our Delos PyPi Client.
Export Delos API Reference
Leverage LLM power with Delos API.
Export the Delos API Reference as text to use it in other applications or for offline reference.
Getting started?
Check out our Delos Platform Documentation guides and tutorials.
BASE URL
CLIENT LIBRARIES
INSTALL
# Get Delos package:
$ pip install delos
INITIALIZATION
from delos import DelosClient
delos_client = DelosClient(your-delos-api-key)
USE
response = delos_client.llm_chat(text="Hello Delos!", model="gpt-4o")
print(response)
LLM
Chat
/llm/chatChat with a LLM. Requires authentication using an API key.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API.
Body Parameters
modelstringThe model to chat with.
Options are gpt-4.1, gpt-4o-mini, gpt-4o,  gpt-3.5 (legacy),command-r, command-r-plus, llama-3-70b-instruct, mistral-large, mistral-small, claude-3.5-sonnet, claude-3-haiku, claude-3.7
messagesstringList of messages to be sent to the LLM.
For example: [{"role": "assistant", "content": "I am your assistant"}, {"role": "user", "content": "Hello, what is your name?"}].
textstringA single message (with role user) to be sent to the LLM. (Prefer using the messages parameter instead)
temperaturefloatChoice of the randomness of the model, in between 0 and 1. (Default value: 0.7).
response_formatstringAllows to request response formatted as
- 
JSON object ( response_format = {'type':'json_object'})
- 
or receive a text string ( response_format = {'type':'text'}), (default behavior). Choosingtextis equivalent to not specifying this parameter.
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datastringOutput of processed request. Contains the LLM answer.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/llm/chatfrom delos import DelosClient
delos_client = DelosClient(api_key='my-delos-api-key')
response = delos_client.llm_chat(
    text='And France? Respond in a JSON',
    model='gpt-4o-mini',
    # response_format={"type":"json_object"}, # uncomment for JSON response
    messages="[
      {'role':'system', 'content':'You are a helpful assistant.'},
      {'role':'user', 'content':'what is the capital of Spain?'},
      {'role':'assistant', 'content':'The capital of Spain is Madrid.'}
    ]"
)
print(response){
  "request_id": "a7049c4f-a7cc-46d1-80e9-2b7ecb8b4a22",
  "response_id": "792b9b3d-3650-4ef1-8d5a-7d4911427bea",
  "status_code": 200,
  "status": "success",
  "message": "Chat response received. (All messages have been read)",
  "data": "The capital city of France is Paris.",
  "error": null,
  "timestamp": "2024-12-03T14:36:53.029212Z",
  "cost": 7e-05,
}Chat Stream
/llm/chat_streamChat with a LLM (streaming). Requires authentication using an API key.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API.
Body Parameters
modelstringThe model to chat with.
Options are gpt-4.1, gpt-4o-mini, gpt-4o,  gpt-3.5 (legacy),command-r, command-r-plus, llama-3-70b-instruct, mistral-large, mistral-small, claude-3.5-sonnet, claude-3-haiku, claude-3.7
messagesstringList of messages to be sent to the LLM.
For example: [{"role": "assistant", "content": "I am your assistant"}, {"role": "user", "content": "Hello, what is your name?"}].
textstringA single message (with role user) to be sent to the LLM. (Prefer using the messages parameter instead)
temperaturefloatChoice of the randomness of the model, in between 0 and 1. (Default value: 0.7).
response_formatstringAllows to request response formatted as
- 
JSON object ( response_format = {"type":"json_object"})
- 
or receive a text string ( response_format = {"type":"text"}), (default behavior). Choosingtextis equivalent to not specifying this parameter.
request_usagebooleanReceive a JSON object at the end of the stream with request details. Default: False.
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datastringOutput of processed request. Contains the LLM answer.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/llm/chat_streamfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.llm_chat_stream(
    text="And France?",
    model="gpt-4o-mini",
    # response_format={"type":"json_object"}, # uncomment for JSON response
    messages="[
      {'role':'system', 'content':'You are a helpful assistant.'},
      {'role':'user', 'content':'what is the capital of Spain?'},
      {'role':'assistant', 'content':'The capital of Spain is Madrid.'}
    ]",
    request_usage=False # 'request_usage=True' for usage tracking
)
print(response)'0:""
'0:"The"
'0:" capital"
'0:" city"
'0:" of"
'0:" France"
'0:" is"
'0:" Paris"
'0:"."
# when usage_tracking=True, end of the stream is:
'2:'{  "id": "5f1490c4-66d1-45f8-a6d8-ce76498c4f07",
      "choices": [{"delta": {}, "finish_reason": "stop"}],
      "request_id": "5f1490c4-66d1-45f8-a6d8-ce76498c4f07",
      "response_id": "431dd385-5941-4447-8f01-e293a2fb63d1",
      "status_code": 200,
      "status": "success",
      "message": "Chat response received.
      (All the 3 previous *messages* have been read.)",
      "timestamp": "2025-03-04T09:03:20.252125+00:00",
      "cost": 0.000465}'
Chat beta
/llm/chat/betaChat with a LLM. (Single endpoint for chat and chat_stream endpoints, by providing stream parameter.)
Requires authentication using an API key.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API.
Body Parameters
modelstringThe model to chat with.
Options are gpt-4.1, gpt-4o-mini, gpt-4o,  gpt-3.5 (legacy),command-r, command-r-plus, llama-3-70b-instruct, mistral-large, mistral-small, claude-3.5-sonnet, claude-3-haiku, claude-3.7
messagesstringList of messages to be sent to the LLM.
For example: [{"role": "assistant", "content": "I am your assistant"}, {"role": "user", "content": "Hello, what is your name?"}].
textstringA single message (with role user) to be sent to the LLM. (Prefer using the messages parameter instead)
temperaturefloatChoice of the randomness of the model, in between 0 and 1. (Default value: 0.7).
response_formatstringAllows to request response formatted as
- 
JSON object ( response_format = {'type':'json_object'})
- 
or receive a text string ( response_format = {'type':'text'}), (default behavior). Choosingtextis equivalent to not specifying this parameter.
streambooleanAllows to request LLM response as:
- 
Response object (as in /llm/chatendpoint), default behavior,
- 
or streaming response (as in /llm/chat_streamendpoint).
request_usagebooleanReceive a JSON object at the end of the stream with request details. Default: False.
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datastringOutput of processed request. Contains the LLM answer.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/llm/chat/betafrom delos import DelosClient
delos_client = DelosClient(api_key='my-delos-api-key')
response = delos_client.llm_chat(
    text='And France? Respond in a JSON',
    model='gpt-4o-mini',
    # response_format={"type":"json_object"}, # uncomment for JSON response
    messages=[
      {"role":"system", "content":"You are a helpful assistant."},
      {"role":"user", "content":"what is the capital of Spain?"},
      {"role":"assistant", "content":"The capital of Spain is Madrid."}
    ],
    stream=False, # 'stream=True' for streaming response
    request_usage=False # 'request_usage=True' for usage tracking
)
print(response){
  "request_id": "a7049c4f-a7cc-46d1-80e9-2b7ecb8b4a22",
  "response_id": "792b9b3d-3650-4ef1-8d5a-7d4911427bea",
  "status_code": 200,
  "status": "success",
  "message": "Chat response received. (All messages have been read)",
  "data": "The capital city of France is Paris.",
  "error": null,
  "timestamp": "2024-12-03T14:36:53.029212Z",
  "cost": 7e-05,
}Embed text
/llm/embedGenerates an embedding for the provided text.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Body Parameters
textstringText to be embedded
modelstringThe model to embed with. Options are ada-v2, text-embedding-3-large
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datadictOutput of processed request. Contains the list of text blocks (since input text is split to fix embedder context-window), numbered from 0 onwards, with their embeddings.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/llm/embedfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.llm_embed(text="Hello world")
print(response){
  "request_id":"6cbd9a37-8ffc-40ab-9f52-be4b35cafeb4",
  "response_id":"ba740405-7854-48ff-8a13-d9075ebfb32e",
  "status_code":200,
  "status":"success",
  "message":"Text successfully embedded.",
  "data": {
    "embedded_texts": [
      {
        "id": 0,
        "text": "Hello world",
        "embedding": [
            -0.018942920491099358,
            -0.012851867824792862,
            ...,
            -0.01006540097296238,
            0.0035288927610963583,
            -0.013837556354701519
        ]
      }
  },
    "error":null,
    "timestamp":"2024-12-03T14:38:10.930607Z",
    "cost":0.00017
}Translate
Translate text
/translate-textTranslate a text using the specified output language.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API.
Body Parameters
textstringThe text to be translated
output_languagestringISO 639-1 code of the target language
input_languagestringISO 639-1 code of the origin language. It is not required.
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datadictOutput of processed request.
translationstringTranslated text
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/translate-textfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.translate_text(
    text="Hello, how are you?",
    output_language="fr",
)
print(response)
{
  "message": "Request completed successfully",
  "request_id": "123e4567-e89b-12d3-a456-426614174000",
  "response_id": "123e4567-e89b-12d3-a456-426614174001",
  "status": "success",
  "status_code": 200,
  "data": {
    "translation": "Hola, ¿cómo estás?"
  },
  "error": null,
  "timestamp": "2024-10-15T13:32:34.727776Z",
  "cost": 0.00002
}Translate a file
/translate-fileTranslate a file using the specified return type.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API.
Body Parameters
filestringFile (path and name) to be translated
output_languagestringISO 639-1 code of the target language
input_languagestringISO 639-1 code of the origin language. It is not required.
return_typestringThe format for the translation result. Options are:
- 
urlto obtain a downloadable file, keeping original layout
- 
or raw_textwhich process just the text and not the whole file formatting (default).
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datadictOutput of processed request.
translationtextTranslated text (if raw_text return type selected)
file_urlstringURL to download the translated file (if url return type selected)
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/translate-filefrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
local_filepath = "/path/to/file_name.docx"
response = delos_client.translate_file(
    filepath=local_filepath,
    output_language="it",
    return_type="raw_text",
)
print(response){
  "request_id": "a92aebfd-231b-4d7f-8721-369f4de4805e",
  "response_id": "0fc761ce-963b-4459-9d46-3f15ca6eb911",
  "status_code": 200,
  "status": "success",
  "message": "Translation completed successfully",
  "data": {
    "translation": "Ciao, questo è un documento di prova.",
    "file_url": null,
  },
  "error": null,
  "timestamp": "2024-10-16T07:25:41.793412Z",
  "cost": 0.00004,
}Files Index
List Index
/files/list_indexLists all index that are active, processing_files or in countdown for the organization, with their details.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
dataarrayOutput of processed request. Contains a list of index available in current organization including index_uuid, created_at, expires_at, status, and vectorized status
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/files/list_index
from delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.files_index_list()
print(response){
  "request_id": "1fb2732b-3632-4c61-bcb7-25078c9b3d87",
  "response_id": "4fc9c0ae-3fae-4725-a25c-28161dc8ea89",
  "status_code": 200,
  "status": "success",
  "message": "Retrieved 2 indices.",
  "data": {
      "indices": [
          {
              "index_uuid": "277b-...-37e",
              "name": "Financial reports",
              "status": "active",
              "vectorized": false,
              "created_at": "2024-12-03T11:29:11.234237+00:00",
              "updated_at": "2024-12-03T11:29:11.234242+00:00",
              "expires_at": null,
              "storage": {
                  "size_bytes": 147086,
                  "size_mb": 0.14,
                  "num_files": 1,
              },
          },
          {
              "index_uuid": "0850f0d1-72d5-4f2a-80f3-6718c5cd6",
              "name": "Resarch Articles",
              "status": "countdown",
              "vectorized": true,
              "created_at": "2024-12-02T16:30:55.310428+00:00",
              "updated_at": "2024-12-03T11:06:53.366713+00:00",
              "expires_at": "2024-12-03T15:07:53.129516+00:00",
              "storage": {
                  "size_bytes": 26385089,
                  "size_mb": 25.16,
                  "num_files": 7,
              },
          },
      ],
      "total_storage": {
          "bytes": 27648191,
          "mb": 26.37,
          "limit_mb": 100,
          "usage_percentage": 26.4,
      },
  },
  "error": null,
  "timestamp": "2024-12-03T14:03:26.680425Z",
  "cost": 0.0,
}Index Details
/files/index_detailsFetches details about a specified index, such as its current status, expiration time, vectorization state, and a list of files it contains.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Query Parameters
index_uuidstringThe unique id for this files Index
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datastringOutput of processed request. Index details including index_uuid, vectorized status, status, expires_at, and files list
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/files/index_detailsfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.files_index_details(
    index_uuid="35d885a5-fc92-4ae5-b030",
)
print(response){
  "request_id":"e08e604b-356b-4f24-b497-058c2410a034",
  "response_id":"8341bb51-7574-4281-bc76-27e150456e65",
  "status_code":200,
  "status":"success",
  "message":"Index 35d885a5-fc92-4ae5-b030 details retrieved.",
  "data":{
      "index_uuid":"277b-...-37ee881",
      "name":"Financial Reports",
      "vectorized":false,
      "status":"active",
      "expires_at":null,
      "created_at":"2024-12-03T11:29:11.234237+00:00",
      "updated_at":"2024-12-06T08:32:01.732122+00:00",
      "storage":
      {
          "size_bytes":83503,
          "size_mb":0.08,
          "num_files":3
      },
     
      "files":[
      {
          "file_id":"3c67-b758c34d1-e316c2968ed-6b96",
          "file_name":"Q3_2023_Financial_Report.pdf",
          "size":2743841
      },
      {
          "file_id":"8dab-82b1f6997-2cb9d9d461b-20d5",
          "file_name":"Presentation.pptx",
          "size":1178274
      },
      {
          "file_id":"c0d5-aaf3791eee-1001e510f-9377",
          "file_name":"Investment_Report_2023.docx",
          "size":28620
      }
    ]
  },
  "error":null,
  "timestamp":"2024-12-06T09:33:40.459524Z",
  "cost":0.0
}Create Index
/files/create_index_and_parseCreates an index for the uploaded files and parses their content.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Body Parameters
namestringName for the index
filesarrayList of files to be uploaded and indexed
read_imagesbooleanChoice to scan the images and graphic elements in the file. (Default: False)
and_vectorizebooleanWhether to automatically vectorize the index after file processing. (Default: False)
tags_indextextList of tags to be enabled for this index, to be used while automatic files tagging by LLM.
tags_filestextList of tags (tags_user) to be applied to the files in this request. Used as filters when querying ask_index.
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datastringOutput of processed request. Contains the information about processed files.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/files/create_index_and_parse
from delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
filepaths = [
  "/path/to/file1.docx",
  "/path/to/file2.pdf",
  "/path/to/file3.txt",
]
response = delos_client.files_index_create(
    filepaths=filepaths,
    name="My Files Index",
    and_vectorize=True,  # Automatically vectorize after processing
)
print(response)
{
  "request_id": "fa86ced4-eb83-4c7d-afbf-57a00f952889",
  "response_id": "4d2d91fa-75aa-4c68-b903-16a92a84a80d",
  "status_code": 200,
  "status": "success",
  "message": "Index '277b-...-ed11'"
    "named 'Financial Reports' created successfully."
    "Files being processed in background."
    "Query 'index_details' using 'index_uuid=277b-...-ed11'"
    "to check the progress."
    "- Files enqueued for processing:"
      "- File 'Financial Reports Q1.pdf'"
      "- File 'Reports 2023.docx'"
    " - Files skipped: None,",
  "data": {
      "index_uuid": "277b-...-ed11",
      "name": "Financial Reports",
      "num_files_enqueued": 3,
      "num_files_skipped": 0,
      "and_vectorize": true,
  },
  "error": null,
  "timestamp": "2024-12-03T13:51:19.123547Z",
  "cost": 0.0027,
}Add Files To Index
/files/add_files_to_indexAdds new files to an existing index.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Body Parameters
index_uuidstringThe unique id for this files Index
filesarrayArray of files to be added to the index
read_imagesbooleanChoice to scan the images and graphic elements in the file. (Default: False)
and_vectorizebooleanWhether to automatically vectorize the index after file processing. (Default: False)
tagsstringList of tags (tags_user) to be appied to all files in this operation. Used as filters when querying ask_index.
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datadictOutput of processed request. Contains the details of newly processed files.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/files/add_files_to_indexfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
filepaths = [
    "/path/to/file1.docx",
    "/path/to/file2.pdf",
    "/path/to/file3.txt",
]
response = delos_client.files_index_add_files(
    index_uuid="277b-...-ed11",
    filepaths=filepaths,
    tags=["quarterly", "Q1", "2024"],
    and_vectorize=True,  # Automatically vectorize after processing
)
print(response){
  "request_id": "53c5e71a-6616-4e99-87bb-f4247111907f",
  "response_id": "1f5a8543-b892-4085-9147-5d9930665ee9",
  "status_code": 200,
  "status": "success",
  "message": "Index '277b-...-ed11'"
    "named 'Financial Reports' updated successfully."
    "Files being processed in background."
    "Query 'index_details' using 'index_uuid=277b-...-ed11'"
    "to check the progress."
  "data": {
    "index_uuid": "277b-...-ed11",
    "name": "Financial Reports",
    "num_files_enqueued": 3,
    "num_files_skipped": 0,
    "and_vectorize": true,
  },
  "error": null,
  "timestamp": "2024-12-06T08:32:01.743056Z",
  "cost": 0.001,
}
Embed Index
/files/embed_indexVectorize Index Content. Calculates the vectorized representations of all text contents within the specified index.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Body Parameters
index_uuidstringThe unique id for this files Index
run_in_backgroundbooleanWhether to run the index contents embedding in the background. When index is trying to load for vectorization big batches (>200 chunks), this operation will automatically be run in background
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datastringOutput of processed request.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/files/embed_indexfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.files_index_embed(
    index_uuid="e5c156e2-aa64-4c7b-9f3e",
)
print(response){
  "request_id": "a1fc8f56-79d8-428a-9b04-e69e5cdc16b2",
  "response_id": "6bee942a-b792-4e1e-aa61-31721c9edb1e",
  "status_code": 200,
  "status": "success",
  "message": "Index 'e5c15...-9f3e' successfully vectorized.",
  "data": {
      "index_uuid": "e5c156e2-aa64-4c7b-9f3e",
  },
  "error": null,
  "timestamp": "2024-12-03T13:39:32.689477Z",
  "cost": 0.00034,
}Ask Index
/files/ask_indexQueries a vectorized index for information related to a given question.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Body Parameters
index_uuidstringUUID of the Index to be queried
questionstringQuestion about the documents in the index
output_languagestringDesired output language code
active_filesstr | list[str]Comma-separated list of file ids belonging to this Index to be considered in this research. (By default, all files in the index will be considered).
tagstextList of files tags that are enabled as filters for this research. Only tags assigned by the user are considered (tags_user), and not the suggested tags (tags_auto) proposed while uploading files.
- 
Files having at least one of these tags_userwill be considered in this research.
- 
Files having no tags_userassigned by the user will be considered as no match, and therefore not included in this research.
instructionstextInstructions for the LLM. They will be added at the end of the answer. For example: "Add at the end of the answer Generated by Delos API."
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datadictOutput of processed request. Contains the response to the question, and the used files sources dictionary.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/files/ask_indexfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.files_index_ask(
    index_uuid="f2503e3e-676a-4673-8ed5-cd7c8b627cea",
    question="Where is the mentioned power station located?",
    output_language="en",
    tags="energy",
    instructions="Add at the end of the answer "
    "'Generated by Delos API'."
)
print(response){
  "request_id": "cffa76cd-87c9-4617-9290-af43671e069e",
  "response_id": "4607b131-1e31-4c1b-aca8-34138cdb46b6",
  "status_code": 200,
  "status": "success",
  "message": "The power station is located in Birmingham."
        "'FILE:1 PAGE:8'... - Generated by Delos API",
  "sources": {
        1: 04bf9438-1db8-1004-b4b5-8d5f1bcbabc3,
        2: 457483f6-e377-a0aa-a86e-c5859756b188,
        3: 17ac47eb-ac0e-280c-bc39-50005a26abdf
  }
  
  "error": null,
  "timestamp": "2024-12-03T14:26:19.919794Z",
  "cost": 0.0,
}Delete Files
/files/delete_files_from_indexDeletes specific files from an existing index using their file ids.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Body Parameters
index_uuidstringThe unique ID for this files Index
files_idsarrayList of file IDs to delete from the index
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datadictOutput of processed request. Contains the list of remaining files.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/files/delete_files_from_indexfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
file_id1 = "127a2-13247f5b08eec-b212b28775-e521f69"
response = delos_client.files_index_delete_files(
    index_uuid="d01fa172b",
    files_ids=[file_id2,file_id3],
)
print(response)
{
  "request_id": "2a0a73d0-b16a-4cb2-a95e-c3d067089157",
  "response_id": "68552aa5-890e-4df5-b10c-1bad8cac102e",
  "status_code": 200,
  "status": "success",
  "message": "File(s) deleted from index successfully",
  "data": {
    "index_uuid": "d01fa172b",
    "deleted_files":
        "- File with id: file_id1 (named 'Document1.pdf',"
        "file_hash: 1d6045f1566169353d)",
    "remaining_files":
        "- File with id: file_id4 (named 'Document4.pdf',"
        "file_hash: 2d6045f1566169353d)"
  },
  "error": null,
  "timestamp": "2024-10-15T13:32:34.727776Z",
  "cost": 0
}
Delete Index
/files/delete_indexMarks an existing index for deletion.
Warning: This operation will be effective after 2h.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Body Parameters
index_uuidstringThe unique ID for the files index
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datastringOutput of processed request.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/files/delete_indexfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.files_index_delete(
    index_uuid="0850-...-a1f33",
)
print(response)
{
  "request_id": "c2957b77-34f7-467a-8bb5-0f2f7c517dee",
  "response_id": "06655901-e06c-4e0c-a28f-6143fa034143",
  "status_code": 200,
  "status": "success",
  "message": "Index marked for deletion",
  "data": {
      "index_uuid": "0850-...-a1f33",
      "expires_at": "2024-12-03T16:32:31.779965+00:00",
  },
  "error": null,
  "timestamp": "2024-12-03T14:32:31.779965Z",
  "cost": 0.0,
}
Retry Failed Files
/files/retry_failed_filesRetries processing of files that previously failed while being uploaded to an index.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Body Parameters
index_uuidstringThe unique id for this files Index
read_imagesbooleanChoice to scan the images and graphic elements in the file. (Default: False)
and_vectorizebooleanWhether to automatically vectorize the index after file processing. (Default: False)
tagsstringList of tags (tags_user) to apply to re-uploaded files. Used as filters when querying ask_index.
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datadictOutput of processed request. Contains the index information and file details.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/files/retry_failed_filesfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.files_index_retry_failed_files(
    index_uuid="277b-...-ed11",
    read_images=False,
    tags="re-upload",
    and_vectorize=True,  # Automatically vectorize after processing
)
print(response)
{
  "request_id": "f251c467-58bb-4686-a965-5686322b53a7",
  "response_id": "5f15975c-780d-47c1-86e1-0185af5efa0c",
  "status_code": 200,
  "status": "success",
  "message": "Index '277b-...-ed11' named 'Financial Reports'"
    "updated successfully. Retrying 2 failed files"
    "('Financial_Q1.pdf', 'Reports_2023.docx') in background."
    "Query 'index_details' using 'index_uuid=277b-...-ed11'"
    "to check the progress."
    "- Files enqueued for processing:"
      "- File 'Financial_Q1.pdf'"
      "- File 'Reports_2023.docx'"
    "- Files skipped: None",
  "data": {
    "index_uuid": "277b-...-ed11",
    "name": "Financial Reports",
    "num_files_retrying": 2,
    "file_ids": ["8f3d-...-b12a", "9a34-...-d789"],
    "and_vectorize": true
  },
  "error": null,
  "timestamp": "2024-12-03T13:51:19.123547Z",
  "cost": 0.0027,
}
Rename Index
/files/rename_indexRenames an existing index.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Body Parameters
index_uuidstringUUID of the Index to be renamed.
namestringNew name for the index.
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datastringOutput of processed request. Contains the new name for the index and the old name.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/files/rename_indexfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.files_index_rename(
    index_uuid="0850f-...-933",
    name="New name",
)
print(response)
{
  "message": "Index name 'Old name' changed to 'New name'.",
  "request_id": "123e4567-e89b-12d3-a456-426614174000",
  "response_id": "123e4567-e89b-12d3-a456-426614174001",
  "status": "success",
  "status_code": 200,
  "index_uuid": "0850f-...-933",
  "old_name": "Old name",
  "new_name": "New name",
  "updated_at": "2024-10-15T13:32:34.727776Z",
}Restore Index
/files/restore_indexCancels the deletion or expiry of an index, within the 2h from the delete_index request.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Body Parameters
index_uuidstringThe unique ID for this files Index
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datastringOutput of processed request.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/files/restore_indexfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.files_index_restore(
    index_uuid="123e4567-e89b-12d3-a456",
)
print(response)
{
  "request_id": "123e4567-e89b-12d3-a456-426614174000",
  "response_id": "123e4567-e89b-12d3-a456-426614174001",
  "status_code": 200,
  "status": "success",
  "message": "Index restored successfully",
  "data": {
      "index_uuid": "123e4567-e89b-12d3-a456",
      "status": "active",
  },
  "timestamp": "2024-11-18T12:00:00Z",
}Files Index Tags
Get Index Tags
/files/get_index_tagsRetrieves the tags for an index.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Query Parameters
index_uuidstringThe unique id for this files Index
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datadictOutput of processed request. Contains the index tags information.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/files/get_index_tagsfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.files_get_index_tags(
    index_uuid="0000-0000-0000-0000"
)
print(response)
{
  "request_id": "f251c467-58bb-4686-a965-5686322b53a7",
  "response_id": "5f15975c-780d-47c1-86e1-0185af5efa0c",
  "status_code": 200,
  "status": "success",
  "message": "Tags information for index 0000-0000-0000-0000",
  "data": "Index 0000-0000-0000-0000 predefined tags:"
          "['research', 'finance', 'quarterly']"
          "Files in index have these tags:"
            "file1.pdf: ['quarterly', 'finance'],"
            "file2.docx: ['annual', 'report']","
  "error": null,
  "timestamp": "2024-12-03T14:12:46.462944Z",
  "cost": 0.0
}Update Index Tags
/files/update_index_tagsUpdates the index_tags of an existing index. They are used in automatic files tagging by LLM.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Body Parameters
index_uuidstringThe unique id for the files index
tagsarrayThe list of tags to be added to the index, to be used while automatic files tagging by LLM. (No use in querying ask_index)
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datadictOutput of processed request containing the index UUID and updated tags.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/files/update_index_tagsfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.files_update_index_tags(
    index_uuid="0000-0000-0000-0000",
    tags=["research", "finance", "quarterly"]
)
print(response){
  "request_id": "f251c467-58bb-4686-a965-5686322b53a7",
  "response_id": "5f15975c-780d-47c1-86e1-0185af5efa0c",
  "status_code": 200,
  "status": "success",
  "message": "Tags information for index 0000-0000-0000-0000",
  "data": "Index 0000-0000-0000-0000 tags updated to"
          "['research', 'finance', 'quarterly']"
          "Files in index have these tags:"
            "file1.pdf: ['quarterly', 'finance'],"
            "file2.docx: ['annual', 'report']","
  "error": null,
  "timestamp": "2024-12-03T14:12:46.462944Z",
  "cost": 0.0
}
Update File Tags
/files/update_index_files_tagsUpdates the tags (tags_user) of specific files within an index. Used as filters when querying ask_index.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Body Parameters
index_uuidstringThe unique id for the files index
files_idsstring | list[string]The ID of the file or files to update tags for
tagsarrayThe list of tags (tags_user) to be added to the file. Used as filters when querying ask_index.
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datastringOutput of processed request.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/files/update_index_files_tagsfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.files_update_files_tags(
    index_uuid="0000-0000-0000-0000",
    files_ids=["abc123"],
    tags="2024"
)
print(response){
  "request_id": "f251c467-58bb-4686-a965-5686322b53a7",
  "response_id": "5f15975c-780d-47c1-86e1-0185af5efa0c",
  "status_code": 200,
  "status": "success",
  "message": "Index 0000-0000-0000-0000"
      " files updated with tags: '2025'."
      "- Files successfully updated: abc123,"
  
  "data": "Index 0000-0000-0000-0000 files tags:"
          "['2024']"
          "Files in index have these tags:"
            "file1_with_id_abc123.pdf: ['2024'],"
            "file2.docx: ['quarterly]","
  "error": null,
  "timestamp": "2024-12-03T14:12:46.462944Z",
  "cost": 0.0
}
Web
Search
/searchPerform a web search using the provided text and output language.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Body Parameters
textstringRequest to be searched.
output_languagestringOutput language code.
desired_urlsarrayComma-separated list of URLs to be priviledged in the search.
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringShort output description after processing the request.
datadictOutput of processed request. Contains the reformulation of the question, the sources URLs on which the answer is based, and the answer obtained.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/search
from delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.web_search(
    text="What is the capital of France?",
    output_language="en",
    desired_urls=["wikipedia.fr"]
)
print(response)
{
  "request_id": "8f032022-8391-4036-8707-63a955d4518d",
  "response_id": "72495910-cbaf-434c-89c2-401590251adf",
  "status_code": 200,
  "status": "success",
  "message": "Search completed successfully",
  "data": {
      "reformulation": "What is the capital of France?",
      "urls": [
          "https://www.example.com/paris",
          "https://www.travel.example/france",
      ],
      "answer": "The capital of France is Paris 'URL:1'...",
  },
  "error": null,
  "timestamp": "2024-12-03T14:19:47.081348Z",
  "cost": 0.0042,
}Status
Health
/healthCheck the health status of the API.
Headers
AuthorizationstringAPI key to authenticate requests to Delos API
Returns
request_idstringUnique ID for this request.
response_idstringUnique ID for this response.
statusstringSuccess or failure of the request.
status_codeintegerHTTP status code.
messagestringHealth status of the API.
datastringOutput of processed request.
errordictErrors description, if any. Default is null.
timestampstringTimestamp of the response.
costfloatCost of processed request.
/healthfrom delos import DelosClient
delos_client = DelosClient(api_key="my-delos-api-key")
response = delos_client.status_health()
print(response)
{
  "request_id": "849f6bde-375f-47e2-9977-8a3e521088b9",
  "response_id": "c5761413-b79a-412c-b324-95ce8dcf4d18",
  "status_code": 200,
  "status": "success",
  "message": "Welcome to DelosAPI",
  "data": null,
  "error": null,
  "timestamp": "2024-12-03T14:22:58.671943Z",
  "cost": 0.0,
}