---
updatedAt: 2026-08-06T09:59:34.000Z
---

# Creates an embedding vector from the input text.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "NVIDIA NIM API for nvidia/nemotron-3-embed-1b",
    "description": "The NVIDIA NIM REST API. Please see https://docs.api.nvidia.com/nim/reference/nvidia-nemotron-3-embed-1b for more details.",
    "version": "1.0.0",
    "termsOfService": "https://nvidia.com/legal/terms-of-use",
    "contact": {
      "name": "NVIDIA Support",
      "url": "https://help.nvidia.com/"
    }
  },
  "servers": [
    {
      "url": "https://integrate.api.nvidia.com/v1"
    }
  ],
  "paths": {
    "/embeddings": {
      "post": {
        "tags": [
          "Embeddings"
        ],
        "summary": "Creates an embedding vector from the input text.",
        "operationId": "create_embedding",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "description": "Input text to embed. Max length is 4096 tokens.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      }
                    ],
                    "minLength": 1,
                    "maxLength": 4096,
                    "title": "Input"
                  },
                  "model": {
                    "type": "string",
                    "description": "ID of the embedding model.",
                    "example": "nvidia/nemotron-3-embed-1b",
                    "default": "nvidia/nemotron-3-embed-1b",
                    "title": "Model"
                  },
                  "input_type": {
                    "type": "string",
                    "enum": [
                      "passage",
                      "query"
                    ],
                    "description": "nvidia/nemotron-3-embed-1b operates in `passage` or `query` mode, and thus requires the `input_type` parameter. `passage` is used when generating embeddings during indexing. `query` is used when generating embeddings during querying. It is very important to use the correct `input_type`. Failure to do so will result in large drops in retrieval accuracy.\n",
                    "title": "Input Type"
                  },
                  "encoding_format": {
                    "type": "string",
                    "description": "The format to return the embeddings in.",
                    "enum": [
                      "float",
                      "base64"
                    ],
                    "default": "float",
                    "title": "Encoding Format"
                  },
                  "truncate": {
                    "type": "string",
                    "description": "Specifies how inputs longer than the maximum token length of the model are handled. Passing `START` discards the start of the input. `END` discards the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model. If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.\n",
                    "enum": [
                      "NONE",
                      "START",
                      "END"
                    ],
                    "default": "NONE",
                    "title": "Truncate"
                  },
                  "user": {
                    "type": "string",
                    "description": "Not implemented, but provided for API compliance. This field is ignored.",
                    "title": "User"
                  }
                },
                "required": [
                  "input",
                  "model"
                ]
              }
            }
          }
        },
        "x-nvai-meta": {
          "name": "Create Text Embedding",
          "description": "Generates an embedding vector from the provided text\nusing a specified model. The embedding can be returned\nin either float array or base64-encoded format.\n",
          "path": "create",
          "examples": [
            {
              "name": "Code retrieval — count frequencies in nested lists",
              "requestJson": "{\n  \"input\": \"Write a Python function that counts the frequency of each element in a list of lists.\",\n  \"model\": \"nvidia/nemotron-3-embed-1b\",\n  \"input_type\": \"query\",\n  \"encoding_format\": \"float\",\n  \"truncate\": \"END\"\n}\n"
            },
            {
              "name": "Code retrieval — order dict by tuple-key product",
              "requestJson": "{\n  \"input\": \"Write a function that orders a dictionary with tuple keys by the product of each key's tuple values.\",\n  \"model\": \"nvidia/nemotron-3-embed-1b\",\n  \"input_type\": \"query\",\n  \"encoding_format\": \"float\",\n  \"truncate\": \"END\"\n}\n"
            },
            {
              "name": "Health retrieval — distinguish eczema",
              "requestJson": "{\n  \"input\": \"What symptoms and common triggers help distinguish eczema from other inflammatory skin conditions?\",\n  \"model\": \"nvidia/nemotron-3-embed-1b\",\n  \"input_type\": \"query\",\n  \"encoding_format\": \"float\",\n  \"truncate\": \"END\"\n}\n"
            },
            {
              "name": "Health retrieval — reduce pollen exposure",
              "requestJson": "{\n  \"input\": \"How can someone reduce exposure to pollen during allergy season?\",\n  \"model\": \"nvidia/nemotron-3-embed-1b\",\n  \"input_type\": \"query\",\n  \"encoding_format\": \"float\",\n  \"truncate\": \"END\"\n}\n"
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Successful response containing embedding vectors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "example": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "index": {
                            "type": "integer"
                          },
                          "object": {
                            "type": "string",
                            "example": "embedding"
                          },
                          "embedding": {
                            "type": "array",
                            "items": {
                              "type": "number"
                            }
                          }
                        }
                      }
                    },
                    "model": {
                      "type": "string",
                      "example": "nvidia/nemotron-3-embed-1b"
                    },
                    "usage": {
                      "type": "object",
                      "properties": {
                        "prompt_tokens": {
                          "type": "integer"
                        },
                        "total_tokens": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request – invalid parameters."
          },
          "401": {
            "description": "Unauthorized – invalid or missing API key."
          },
          "422": {
            "description": "Unprocessable entity – validation error."
          },
          "500": {
            "description": "Internal server error."
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```