---
title: "Create Service"
method: PUT
path: "/v1/app/{sname}"
tags: ["v1"]
---

# Create Service

`PUT /v1/app/{sname}`

Create a new service

## Path parameters

- `sname` string, required

## Request body

- APIData — Main API object
  - `description` string, nullable
  - `app` AppObj — Application information and settings
    - `repository` union
      - string, directory-path
      - string, path
    - `create_repository` boolean
    - `models_repository` string, nullable
    - `verbose` 'info' | 'debug' | 'warning' | 'error' | 'critical' — Logging verbosity options
    - `log_in_app_dir` boolean
  - `parameters` ParametersObj — Global (input, llm, output) parameters holder
    - `input` InputConnectorObj — Input connector, get data into the proper shape for indexing, searching and answering
      - `lib` 'coldb' | 'diffusr' | 'hf' | 'langchain'
      - `preprocessing` PreprocessingObj — Preprocessing options for indexing calls
        - `files` string[]
        - `lib` string, nullable
        - `save_output` boolean
        - `strict` boolean
        - `filters` string[]
        - `strategy` string
        - `cleaning` boolean
        - `dpi` integer
      - `rag` RAGObj — Main RAG parameters
        - `indexdb_lib` 'chromadb' | 'coldb'
        - `retrieval_mode` 'embedding_retrieval' | 'text_search_retrieval' | 'hybrid'
        - `embedding_lib` 'huggingface' | 'colbert' | 'vllm'
        - `embedding_model` string, nullable
        - `embedding_model_path` string, nullable
        - `shared_model` boolean
        - `chunk_size` integer
        - `chunk_overlap` integer
        - `chunk_num` integer
        - `gpu_id` integer, nullable
        - `search` boolean
        - `text_search_engine_top_k` integer
        - `text_search_engine_fields` string[]
        - `text_search_engine_max_chars_per_doc` integer
        - `text_search_engine_max_total_chars` integer
        - `reindex` boolean
        - `index_protection` boolean
        - `update_index` boolean
        - `top_k` integer
        - `remove_duplicates` boolean
        - `num_partitions` integer
        - `index_bsize` integer
        - `ragm` RAGMultimodalObj — Multimodal RAG parameters
          - `layout_detection` boolean
          - `layout_detector_gpu_id` integer, nullable
          - `layout_detector_model_path` string
          - `image_width` integer, nullable
          - `image_height` integer, nullable
          - `auto_scale_for_font` boolean
          - `min_font_size` integer
          - `filter_width` integer
          - `filter_height` integer
          - `index_overview` boolean
        - `vllm_rag_quantization` string, nullable
        - `vllm_rag_memory_utilization` number
        - `vllm_rag_enforce_eager` boolean
      - `template` TemplatePromptObj — Template prompt object
        - `template_prompt` string, nullable
        - `template_prompt_variables` string[]
      - `message` string, nullable
      - `data` string[], nullable
      - `session_id` string, nullable
      - `summarize` string, nullable
      - `query_depth_mult` integer
      - `streaming` boolean
      - `crop_label` union
        - string
        - string[]
    - `llm` LLMModelObj — Main LLM parameters for answering
      - `source` string
      - `filename` string, nullable
      - `shared_model` boolean
      - `inference` LLMInferenceObj — LLM and multimodal LLM inference parameters
        - `lib` 'diffusers' | 'huggingface' | 'llamacpp' | 'ollama' | 'vllm' | 'vllm_client'
        - `sampling_params` object
      - `context_size` integer
      - `gpu_ids` integer[], nullable
      - `vllm_quantization` string, nullable
      - `vllm_memory_utilization` number
      - `vllm_enforce_eager` boolean
      - `image_width` integer, nullable
      - `image_height` integer, nullable
      - `adjust_aspect_ratio` boolean
      - `dtype` string
      - `host` string, nullable
      - `port` integer, nullable
      - `conversational` boolean
      - `stitch_crops` boolean
      - `load_in_8bit` boolean
      - `query_rephrasing` boolean
      - `query_rephrasing_num_tok` integer
      - `external_vllm_server` VLLMServerObj
        - `url` string
        - `api_key` string
      - `system_prompt` string, nullable
      - `disable_thinking` boolean
      - `use_hyde` boolean
      - `hyde_num_tokens` integer
    - `output` OutputConnectorObj — Output connector for post-processing parameters
      - `postprocessing` string[]
      - `output_format` 'json'
      - `base64` boolean
      - `num_tokens` integer

## Response `200`

Successful Response

- APIResponse — Main API Response object to all calls
  - `version` string, nullable
  - `status_code` integer, nullable
  - `status` StatusObj — System status response object
    - `code` integer, nullable
    - `status` string, nullable
    - `colette_code` integer, nullable
    - `colette_message` string, nullable
  - `info` InfoObj — System info response object
    - `services` string[], nullable
  - `service_name` string, nullable
  - `full_prompt` string, nullable
  - `full_response` object, nullable
  - `sources` object, nullable
  - `message` string, nullable
  - `output` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/jolibrain/apis/colette-version-server.md) · [All operations](https://skmtc.net/jolibrain/apis/colette-version-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jolibrain/colette-version-server/versions/73989efa31d3/schema)
