> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moorcheh.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# moorcheh upload-vectors

> Upload vectors to a vector namespace.

## Overview

Uploads precomputed vectors from a JSON file to a **vector** namespace. Returns an async `job_id` — poll with [moorcheh upload-job-status](/on-prem/cli/data/upload-job-status).

Each vector length must match the namespace `vector_dimension`.

## Synopsis

```bash theme={null}
moorcheh upload-vectors --namespace-name NAME --vectors-file PATH [--base-url URL]
```

## Options

| Flag               | Required | Description                              |
| ------------------ | -------- | ---------------------------------------- |
| `--namespace-name` | Yes      | Target vector namespace                  |
| `--vectors-file`   | Yes      | Path to JSON file with a `vectors` array |
| `--base-url`       | No       | Default `http://localhost:8080`          |

## Vectors file format

`vectors.json`:

```json theme={null}
{
  "vectors": [
    {
      "id": "vec-1",
      "vector": [0.1, 0.2, 0.3, 0.4, 0.5],
      "source": "demo"
    }
  ]
}
```

The `vector` array length must match `vector_dimension` for the namespace (for example `5` or `768`).

## Examples

```bash theme={null}
moorcheh upload-vectors --namespace-name my-embeddings --vectors-file vectors.json

moorcheh upload-job-status --namespace-name my-embeddings --job-id <job_id>
```

## Output

Prints JSON from `POST /namespaces/{namespace_name}/vectors`:

<ResponseField name="status" type="string">
  `"success"` when the upload job was started; `"failure"` on error.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable result or error description.
</ResponseField>

<ResponseField name="job_id" type="string">
  Async upload job id.
</ResponseField>

<ResponseField name="namespace_name" type="string">
  Target namespace.
</ResponseField>

<ResponseField name="total" type="number">
  Number of vectors accepted into the job.
</ResponseField>

<ResponseField name="items" type="number">
  Current item count. Present on **409** item limit errors.
</ResponseField>

<ResponseField name="max_items" type="number">
  Global item cap. Present on **409** errors.
</ResponseField>

<ResponseField name="requested_new" type="number">
  New ids that would exceed the cap. Present on **409** errors.
</ResponseField>

```json Example output theme={null}
{
  "status": "success",
  "message": "Vectors upload started. Poll job status for progress.",
  "job_id": "job-86a80193802144bbb718b48b1954997d",
  "namespace_name": "my-embeddings",
  "total": 1
}
```

## Exit codes

| Code | Meaning                         |
| ---- | ------------------------------- |
| `0`  | Upload job started              |
| `1`  | API error (400, 404, 409, etc.) |

## Related

* [CLI: upload-job-status](/on-prem/cli/data/upload-job-status)
* [API: Upload vectors](/on-prem/api-references/data/upload-vectors)
* [Python: vectors.upload()](/on-prem/python-client/data/upload-vectors)
