# Create

Launch stage: GA

`POST /api/2.0/vector-search/endpoints`

Create a new endpoint.

API scopes: vector-search

## Request body

- `name` (string, optional)
  Name of the AI Search endpoint
  Example: `docs-endpoint`
- `endpoint_type` (string, optional)
  Type of endpoint
  Possible values: `STORAGE_OPTIMIZED`, `STANDARD`
- `budget_policy_id` (string, optional, Public Preview)
  The budget policy id to be applied
  Example: `8b0444ff-8b60-48b0-9d31-e391f6126e0f`
- `target_qps` (int64, optional)
  Target QPS for the endpoint. Mutually exclusive with num_replicas.
   The actual replica count is calculated at index creation/sync time based on this value.
   Best-effort target; the system does not guarantee this QPS will be achieved.
  Example: `100`

## Returns

- `name` (string, optional)
  Name of the AI Search endpoint
  Example: `docs-endpoint`
- `creator` (string, optional)
  Creator of the endpoint
  Example: `john@example.com`
- `creation_timestamp` (int64, optional)
  Timestamp of endpoint creation
  Example: `1702013512061`
- `last_updated_timestamp` (int64, optional)
  Timestamp of last update to the endpoint
  Example: `1702013512061`
- `endpoint_type` (string, optional)
  Type of endpoint
  Possible values: `STORAGE_OPTIMIZED`, `STANDARD`
- `last_updated_user` (string, optional)
  User who last updated the endpoint
  Example: `john@example.com`
- `id` (string, optional)
  Unique identifier of the endpoint
  Example: `c56bf0a9-4929-4bd4-8bd5-d82ca62f9c76`
- `endpoint_status` (object, optional)
  Current status of the endpoint
  - `state` (string, optional)
    Current state of the endpoint
    Possible values: `PROVISIONING`, `ONLINE`, `OFFLINE`, `RED_STATE`, `YELLOW_STATE`, `DELETED`
    Example: `PROVISIONING`
  - `message` (string, optional)
    Additional status message
- `num_indexes` (int32, optional)
  Number of indexes on the endpoint
- `budget_policy_id` (string, optional, Public Preview)
  The user-selected budget policy id for the endpoint.
- `effective_budget_policy_id` (string, optional, Public Preview)
  The budget policy id applied to the endpoint
  Example: `8b0444ff-8b60-48b0-9d31-e391f6126e0f`
- `scaling_info` (object, optional)
  Scaling information for the endpoint
  - `state` (string, optional, Beta)
    The current state of the scaling change request.
    Possible values: `SCALING_CHANGE_UNSPECIFIED`, `SCALING_CHANGE_APPLIED`, `SCALING_CHANGE_IN_PROGRESS`
    Example: `SCALING_CHANGE_APPLIED`
  - `requested_target_qps` (int64, optional)
    The requested QPS target for the endpoint. Best-effort; the system does not
     guarantee this QPS will be achieved.
    Example: `500`

## Request

### Create a Standard endpoint

```json
{
  "budget_policy_id": "8b0444ff-8b60-48b0-9d31-e391f6126e0f",
  "endpoint_type": "STANDARD",
  "name": "docs-endpoint"
}
```

## Response

### Successful response

```json
{
  "creation_timestamp": 1702013512061,
  "creator": "john@example.com",
  "effective_budget_policy_id": "8b0444ff-8b60-48b0-9d31-e391f6126e0f",
  "endpoint_status": {
    "state": "PROVISIONING"
  },
  "endpoint_type": "STANDARD",
  "id": "c56bf0a9-4929-4bd4-8bd5-d82ca62f9c76",
  "last_updated_timestamp": 1702013512061,
  "last_updated_user": "john@example.com",
  "name": "docs-endpoint"
}
```

