---
title: "Create a new Embedding Model Configuration"
method: POST
path: "/api/v1/embedding-model-configs"
tags: ["Embedding Model Configs"]
---

# Create a new Embedding Model Configuration

`POST /api/v1/embedding-model-configs`

Create a new embedding model configuration within a specified project.

## Query parameters

- `project_id` string, uuid, nullable
- `organization_id` string, uuid, nullable

## Cookies

- `session` string, nullable

## Request body

- EmbeddingModelConfigCreate
  - `name` string, required — The name of the embedding model config.
  - `embedding_config` union, required — The embedding configuration for the embedding model config.
    - AzureOpenAIEmbeddingConfig
      - `type` 'AZURE_EMBEDDING' — Type of the embedding model.
      - `component` AzureOpenAIEmbedding
        - `model_name` string — The name of the OpenAI embedding model.
        - `embed_batch_size` integer — The batch size for embedding calls.
        - `num_workers` integer, nullable — The number of workers to use for async embedding calls.
        - `additional_kwargs` object — Additional kwargs for the OpenAI API.
        - `api_key` string, nullable — The OpenAI API key.
        - `api_base` string — The base URL for Azure deployment.
        - `api_version` string — The version for Azure OpenAI API.
        - `max_retries` integer — Maximum number of retries.
        - `timeout` number — Timeout for each request.
        - `default_headers` object, nullable — The default headers for API requests.
        - `reuse_client` boolean — Reuse the OpenAI client between requests. When doing anything with large volumes of async API calls, setting this to false can improve stability.
        - `dimensions` integer, nullable — The number of dimensions on the output embedding vectors. Works only with v3 embedding models.
        - `azure_endpoint` string, nullable — The Azure endpoint to use.
        - `azure_deployment` string, nullable — The Azure deployment to use.
        - `class_name` string
    - CohereEmbeddingConfig
      - `type` 'COHERE_EMBEDDING' — Type of the embedding model.
      - `component` CohereEmbedding
        - `model_name` string — The modelId of the Cohere model to use.
        - `embed_batch_size` integer — The batch size for embedding calls.
        - `num_workers` integer, nullable — The number of workers to use for async embedding calls.
        - `api_key` string, nullable, required — The Cohere API key.
        - `truncate` string — Truncation type - START/ END/ NONE
        - `input_type` string, nullable — Model Input type. If not provided, search_document and search_query are used when needed.
        - `embedding_type` string — Embedding type. If not provided float embedding_type is used when needed.
        - `class_name` string
    - GeminiEmbeddingConfig
      - `type` 'GEMINI_EMBEDDING' — Type of the embedding model.
      - `component` GeminiEmbedding
        - `model_name` string — The modelId of the Gemini model to use.
        - `embed_batch_size` integer — The batch size for embedding calls.
        - `num_workers` integer, nullable — The number of workers to use for async embedding calls.
        - `title` string, nullable — Title is only applicable for retrieval_document tasks, and is used to represent a document title. For other tasks, title is invalid.
        - `task_type` string, nullable — The task for embedding model.
        - `api_key` string, nullable — API key to access the model. Defaults to None.
        - `api_base` string, nullable — API base to access the model. Defaults to None.
        - `transport` string, nullable — Transport to access the model. Defaults to None.
        - `output_dimensionality` integer, nullable — Optional reduced dimension for output embeddings. Supported by models/text-embedding-004 and newer (e.g. gemini-embedding-001). Not supported by models/embedding-001.
        - `class_name` string
    - HuggingFaceInferenceAPIEmbeddingConfig
      - `type` 'HUGGINGFACE_API_EMBEDDING' — Type of the embedding model.
      - `component` HuggingFaceInferenceAPIEmbedding
        - `model_name` string, nullable — Hugging Face model name. If None, the task will be used.
        - `embed_batch_size` integer — The batch size for embedding calls.
        - `num_workers` integer, nullable — The number of workers to use for async embedding calls.
        - `pooling` 'cls' | 'mean' | 'last' — Enum of possible pooling choices with pooling behaviors.
        - `query_instruction` string, nullable — Instruction to prepend during query embedding.
        - `text_instruction` string, nullable — Instruction to prepend during text embedding.
        - `token` union — Hugging Face token. Will default to the locally saved token. Pass token=False if you don’t want to send your token to the server.
          - string
          - boolean
        - `timeout` number, nullable — The maximum number of seconds to wait for a response from the server. Loading a new model in Inference API can take up to several minutes. Defaults to None, meaning it will loop until the server is available.
        - `headers` object, nullable — Additional headers to send to the server. By default only the authorization and user-agent headers are sent. Values in this dictionary will override the default values.
        - `cookies` object, nullable — Additional cookies to send to the server.
        - `task` string, nullable — Optional task to pick Hugging Face's recommended model, used when model_name is left as default of None.
        - `class_name` string
    - OpenAIEmbeddingConfig
      - `type` 'OPENAI_EMBEDDING' — Type of the embedding model.
      - `component` OpenAIEmbedding
        - `model_name` string — The name of the OpenAI embedding model.
        - `embed_batch_size` integer — The batch size for embedding calls.
        - `num_workers` integer, nullable — The number of workers to use for async embedding calls.
        - `additional_kwargs` object — Additional kwargs for the OpenAI API.
        - `api_key` string, nullable — The OpenAI API key.
        - `api_base` string, nullable — The base URL for OpenAI API.
        - `api_version` string, nullable — The version for OpenAI API.
        - `max_retries` integer — Maximum number of retries.
        - `timeout` number — Timeout for each request.
        - `default_headers` object, nullable — The default headers for API requests.
        - `reuse_client` boolean — Reuse the OpenAI client between requests. When doing anything with large volumes of async API calls, setting this to false can improve stability.
        - `dimensions` integer, nullable — The number of dimensions on the output embedding vectors. Works only with v3 embedding models.
        - `class_name` string
    - VertexAIEmbeddingConfig
      - `type` 'VERTEXAI_EMBEDDING' — Type of the embedding model.
      - `component` VertexTextEmbedding
        - `model_name` string — The modelId of the VertexAI model to use.
        - `embed_batch_size` integer — The batch size for embedding calls.
        - `num_workers` integer, nullable — The number of workers to use for async embedding calls.
        - `location` string, required — The default location to use when making API calls.
        - `project` string, required — The default GCP project to use when making Vertex API calls.
        - `embed_mode` 'default' | 'classification' | 'clustering' | 'similarity' | 'retrieval' — Copied from llama_index.embeddings.vertex.base.VertexEmbeddingMode since importing llama_index.embeddings.vertex.base incurs a lot of memory usage.
        - `additional_kwargs` object — Additional kwargs for the Vertex.
        - `client_email` string, nullable, required — The client email for the VertexAI credentials.
        - `token_uri` string, nullable, required — The token URI for the VertexAI credentials.
        - `private_key_id` string, nullable, required — The private key ID for the VertexAI credentials.
        - `private_key` string, nullable, required — The private key for the VertexAI credentials.
        - `class_name` string
    - BedrockEmbeddingConfig
      - `type` 'BEDROCK_EMBEDDING' — Type of the embedding model.
      - `component` BedrockEmbedding
        - `model_name` string — The modelId of the Bedrock model to use.
        - `embed_batch_size` integer — The batch size for embedding calls.
        - `num_workers` integer, nullable — The number of workers to use for async embedding calls.
        - `profile_name` string, nullable — The name of aws profile to use. If not given, then the default profile is used.
        - `aws_access_key_id` string, nullable — AWS Access Key ID to use
        - `aws_secret_access_key` string, nullable — AWS Secret Access Key to use
        - `aws_session_token` string, nullable — AWS Session Token to use
        - `region_name` string, nullable — AWS region name to use. Uses region configured in AWS CLI if not passed
        - `max_retries` integer — The maximum number of API retries.
        - `timeout` number — The timeout for the Bedrock API request in seconds. It will be used for both connect and read timeouts.
        - `additional_kwargs` object — Additional kwargs for the bedrock client.
        - `class_name` string

## Response `201`

Successful Response

- EmbeddingModelConfig — Schema for an embedding model config.
  - `id` string, uuid, required — Unique identifier
  - `created_at` string, date-time, nullable — Creation datetime
  - `updated_at` string, date-time, nullable — Update datetime
  - `name` string, required — The name of the embedding model config.
  - `embedding_config` union, required — The embedding configuration for the embedding model config.
    - AzureOpenAIEmbeddingConfig
      - `type` 'AZURE_EMBEDDING' — Type of the embedding model.
      - `component` AzureOpenAIEmbedding
        - `model_name` string — The name of the OpenAI embedding model.
        - `embed_batch_size` integer — The batch size for embedding calls.
        - `num_workers` integer, nullable — The number of workers to use for async embedding calls.
        - `additional_kwargs` object — Additional kwargs for the OpenAI API.
        - `api_key` string, nullable — The OpenAI API key.
        - `api_base` string — The base URL for Azure deployment.
        - `api_version` string — The version for Azure OpenAI API.
        - `max_retries` integer — Maximum number of retries.
        - `timeout` number — Timeout for each request.
        - `default_headers` object, nullable — The default headers for API requests.
        - `reuse_client` boolean — Reuse the OpenAI client between requests. When doing anything with large volumes of async API calls, setting this to false can improve stability.
        - `dimensions` integer, nullable — The number of dimensions on the output embedding vectors. Works only with v3 embedding models.
        - `azure_endpoint` string, nullable — The Azure endpoint to use.
        - `azure_deployment` string, nullable — The Azure deployment to use.
        - `class_name` string
    - CohereEmbeddingConfig
      - `type` 'COHERE_EMBEDDING' — Type of the embedding model.
      - `component` CohereEmbedding
        - `model_name` string — The modelId of the Cohere model to use.
        - `embed_batch_size` integer — The batch size for embedding calls.
        - `num_workers` integer, nullable — The number of workers to use for async embedding calls.
        - `api_key` string, nullable, required — The Cohere API key.
        - `truncate` string — Truncation type - START/ END/ NONE
        - `input_type` string, nullable — Model Input type. If not provided, search_document and search_query are used when needed.
        - `embedding_type` string — Embedding type. If not provided float embedding_type is used when needed.
        - `class_name` string
    - GeminiEmbeddingConfig
      - `type` 'GEMINI_EMBEDDING' — Type of the embedding model.
      - `component` GeminiEmbedding
        - `model_name` string — The modelId of the Gemini model to use.
        - `embed_batch_size` integer — The batch size for embedding calls.
        - `num_workers` integer, nullable — The number of workers to use for async embedding calls.
        - `title` string, nullable — Title is only applicable for retrieval_document tasks, and is used to represent a document title. For other tasks, title is invalid.
        - `task_type` string, nullable — The task for embedding model.
        - `api_key` string, nullable — API key to access the model. Defaults to None.
        - `api_base` string, nullable — API base to access the model. Defaults to None.
        - `transport` string, nullable — Transport to access the model. Defaults to None.
        - `output_dimensionality` integer, nullable — Optional reduced dimension for output embeddings. Supported by models/text-embedding-004 and newer (e.g. gemini-embedding-001). Not supported by models/embedding-001.
        - `class_name` string
    - HuggingFaceInferenceAPIEmbeddingConfig
      - `type` 'HUGGINGFACE_API_EMBEDDING' — Type of the embedding model.
      - `component` HuggingFaceInferenceAPIEmbedding
        - `model_name` string, nullable — Hugging Face model name. If None, the task will be used.
        - `embed_batch_size` integer — The batch size for embedding calls.
        - `num_workers` integer, nullable — The number of workers to use for async embedding calls.
        - `pooling` 'cls' | 'mean' | 'last' — Enum of possible pooling choices with pooling behaviors.
        - `query_instruction` string, nullable — Instruction to prepend during query embedding.
        - `text_instruction` string, nullable — Instruction to prepend during text embedding.
        - `token` union — Hugging Face token. Will default to the locally saved token. Pass token=False if you don’t want to send your token to the server.
          - string
          - boolean
        - `timeout` number, nullable — The maximum number of seconds to wait for a response from the server. Loading a new model in Inference API can take up to several minutes. Defaults to None, meaning it will loop until the server is available.
        - `headers` object, nullable — Additional headers to send to the server. By default only the authorization and user-agent headers are sent. Values in this dictionary will override the default values.
        - `cookies` object, nullable — Additional cookies to send to the server.
        - `task` string, nullable — Optional task to pick Hugging Face's recommended model, used when model_name is left as default of None.
        - `class_name` string
    - OpenAIEmbeddingConfig
      - `type` 'OPENAI_EMBEDDING' — Type of the embedding model.
      - `component` OpenAIEmbedding
        - `model_name` string — The name of the OpenAI embedding model.
        - `embed_batch_size` integer — The batch size for embedding calls.
        - `num_workers` integer, nullable — The number of workers to use for async embedding calls.
        - `additional_kwargs` object — Additional kwargs for the OpenAI API.
        - `api_key` string, nullable — The OpenAI API key.
        - `api_base` string, nullable — The base URL for OpenAI API.
        - `api_version` string, nullable — The version for OpenAI API.
        - `max_retries` integer — Maximum number of retries.
        - `timeout` number — Timeout for each request.
        - `default_headers` object, nullable — The default headers for API requests.
        - `reuse_client` boolean — Reuse the OpenAI client between requests. When doing anything with large volumes of async API calls, setting this to false can improve stability.
        - `dimensions` integer, nullable — The number of dimensions on the output embedding vectors. Works only with v3 embedding models.
        - `class_name` string
    - VertexAIEmbeddingConfig
      - `type` 'VERTEXAI_EMBEDDING' — Type of the embedding model.
      - `component` VertexTextEmbedding
        - `model_name` string — The modelId of the VertexAI model to use.
        - `embed_batch_size` integer — The batch size for embedding calls.
        - `num_workers` integer, nullable — The number of workers to use for async embedding calls.
        - `location` string, required — The default location to use when making API calls.
        - `project` string, required — The default GCP project to use when making Vertex API calls.
        - `embed_mode` 'default' | 'classification' | 'clustering' | 'similarity' | 'retrieval' — Copied from llama_index.embeddings.vertex.base.VertexEmbeddingMode since importing llama_index.embeddings.vertex.base incurs a lot of memory usage.
        - `additional_kwargs` object — Additional kwargs for the Vertex.
        - `client_email` string, nullable, required — The client email for the VertexAI credentials.
        - `token_uri` string, nullable, required — The token URI for the VertexAI credentials.
        - `private_key_id` string, nullable, required — The private key ID for the VertexAI credentials.
        - `private_key` string, nullable, required — The private key for the VertexAI credentials.
        - `class_name` string
    - BedrockEmbeddingConfig
      - `type` 'BEDROCK_EMBEDDING' — Type of the embedding model.
      - `component` BedrockEmbedding
        - `model_name` string — The modelId of the Bedrock model to use.
        - `embed_batch_size` integer — The batch size for embedding calls.
        - `num_workers` integer, nullable — The number of workers to use for async embedding calls.
        - `profile_name` string, nullable — The name of aws profile to use. If not given, then the default profile is used.
        - `aws_access_key_id` string, nullable — AWS Access Key ID to use
        - `aws_secret_access_key` string, nullable — AWS Secret Access Key to use
        - `aws_session_token` string, nullable — AWS Session Token to use
        - `region_name` string, nullable — AWS region name to use. Uses region configured in AWS CLI if not passed
        - `max_retries` integer — The maximum number of API retries.
        - `timeout` number — The timeout for the Bedrock API request in seconds. It will be used for both connect and read timeouts.
        - `additional_kwargs` object — Additional kwargs for the bedrock client.
        - `class_name` string
  - `project_id` string, uuid, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/run-llama/apis/llama-platform.md) · [All operations](https://skmtc.net/run-llama/apis/llama-platform/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/run-llama/llama-platform/revisions/b17341164de9/schema)
