---
title: "Create compute endpoint"
method: POST
path: "/projects/{project_id}/endpoints"
tags: ["Endpoint"]
---

# Create compute endpoint

`POST /projects/{project_id}/endpoints`

Creates a compute endpoint for the specified branch.
A compute endpoint is a Neon compute instance.
There is a maximum of one read-write compute endpoint per branch.
If the specified branch already has a read-write compute endpoint, the operation fails.
A branch can have multiple read-only compute endpoints.

For more information about compute endpoints, see [Manage computes](https://neon.com/docs/manage/endpoints/).

## Request body

- EndpointCreateRequest
  - `endpoint` object, required
    - `branch_id` string, required — The ID of the branch the compute endpoint will be associated with
    - `region_id` string — The region where the compute endpoint will be created. Only the project's `region_id` is permitted.
    - `type` 'read_only' | 'read_write', required — The compute endpoint type. Either `read_write` or `read_only`.
    - `settings` EndpointSettingsData — A collection of settings for a compute endpoint
      - `pg_settings` PgSettingsData — A raw representation of Postgres settings
      - `pgbouncer_settings` PgbouncerSettingsData — DEPRECATED. A raw representation of PgBouncer settings. This schema is deprecated and will be removed after 2026-06-20.
      - `preload_libraries` PreloadLibraries — The shared libraries to preload into the project's compute instances.
        - `use_defaults` boolean
        - `enabled_libraries` string[]
    - `autoscaling_limit_min_cu` number
    - `autoscaling_limit_max_cu` number
    - `provisioner` string — The Neon compute provisioner. Specify the `k8s-neonvm` provisioner to create a compute endpoint that supports Autoscaling. Provisioner can be one of the following values: * k8s-pod * k8s-neonvm * serverless-platform Clients must expect, that any string value that is not documented in the description above should be treated as a error. UNKNOWN value if safe to treat as an error too.
    - `pooler_enabled` boolean — DEPRECATED. Whether to enable connection pooling for the compute endpoint. The recommended way to enable connection pooling is to append `-pooler` to the endpoint ID in the connection string. See [How to use connection pooling](https://neon.com/docs/connect/connection-pooling#how-to-use-connection-pooling)
    - `pooler_mode` 'transaction' — DEPRECATED. The connection pooler mode. Neon supports PgBouncer in `transaction` mode only. This schema is deprecated and will be removed after 2026-06-20.
    - `disabled` boolean — Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action. However, the compute endpoint is periodically enabled by check_availability operations.
    - `passwordless_access` boolean — NOT YET IMPLEMENTED. Whether to permit passwordless access to the compute endpoint.
    - `suspend_timeout_seconds` integer — Duration of inactivity in seconds after which the compute endpoint is automatically suspended. The value `0` means use the default value. The value `-1` means never suspend. The default value is `300` seconds (5 minutes). The minimum value is `60` seconds (1 minute). The maximum value is `604800` seconds (1 week). For more information, see [Scale to zero configuration](https://neon.com/docs/manage/endpoints#scale-to-zero-configuration).
    - `name` string — Optional name of the compute endpoint

## Response `201`

Created a compute endpoint

- EndpointOperations
  - `endpoint` Endpoint, required
    - `host` string, required — The hostname of the compute endpoint. This is the hostname specified when connecting to a Neon database.
    - `id` string, required — The compute endpoint ID. Compute endpoint IDs have an `ep-` prefix. For example: `ep-little-smoke-851426`
    - `name` string — Optional name of the compute endpoint
    - `project_id` string, required — The ID of the project to which the compute endpoint belongs
    - `branch_id` string, required — The ID of the branch that the compute endpoint is associated with
    - `autoscaling_limit_min_cu` number, required
    - `autoscaling_limit_max_cu` number, required
    - `region_id` string, required — The region identifier
    - `type` 'read_only' | 'read_write', required — The compute endpoint type. Either `read_write` or `read_only`.
    - `current_state` 'init' | 'active' | 'idle', required — The state of the compute endpoint
    - `pending_state` 'init' | 'active' | 'idle' — The state of the compute endpoint
    - `settings` EndpointSettingsData, required — A collection of settings for a compute endpoint
      - `pg_settings` PgSettingsData — A raw representation of Postgres settings
      - `pgbouncer_settings` PgbouncerSettingsData — DEPRECATED. A raw representation of PgBouncer settings. This schema is deprecated and will be removed after 2026-06-20.
      - `preload_libraries` PreloadLibraries — The shared libraries to preload into the project's compute instances.
        - `use_defaults` boolean
        - `enabled_libraries` string[]
    - `pooler_enabled` boolean, required — DEPRECATED. Whether to enable connection pooling for the compute endpoint. The recommended way to enable connection pooling is to append `-pooler` to the endpoint ID in the connection string. See [How to use connection pooling](https://neon.com/docs/connect/connection-pooling#how-to-use-connection-pooling)
    - `pooler_mode` 'transaction', required — DEPRECATED. The connection pooler mode. Neon supports PgBouncer in `transaction` mode only. This schema is deprecated and will be removed after 2026-06-20.
    - `disabled` boolean, required — Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action.
    - `passwordless_access` boolean, required — Whether to permit passwordless access to the compute endpoint
    - `last_active` string, date-time — A timestamp indicating when the compute endpoint was last active
    - `creation_source` string, required — The compute endpoint creation source
    - `created_at` string, date-time, required — A timestamp indicating when the compute endpoint was created
    - `updated_at` string, date-time, required — A timestamp indicating when the compute endpoint was last updated
    - `started_at` string, date-time — A timestamp indicating when the compute endpoint was last started
    - `suspended_at` string, date-time — A timestamp indicating when the compute endpoint was last suspended
    - `proxy_host` string, required — DEPRECATED. Use the "host" property instead.
    - `suspend_timeout_seconds` integer, required — Duration of inactivity in seconds after which the compute endpoint is automatically suspended. The value `0` means use the default value. The value `-1` means never suspend. The default value is `300` seconds (5 minutes). The minimum value is `60` seconds (1 minute). The maximum value is `604800` seconds (1 week). For more information, see [Scale to zero configuration](https://neon.com/docs/manage/endpoints#scale-to-zero-configuration).
    - `provisioner` string, required — The Neon compute provisioner. Specify the `k8s-neonvm` provisioner to create a compute endpoint that supports Autoscaling. Provisioner can be one of the following values: * k8s-pod * k8s-neonvm * serverless-platform Clients must expect, that any string value that is not documented in the description above should be treated as a error. UNKNOWN value if safe to treat as an error too.
    - `compute_release_version` string — Attached compute's release version number.
  - `operations` Operation[], required
    - `id` string, uuid, required — The operation ID
    - `project_id` string, required — The Neon project ID
    - `branch_id` string — The branch ID
    - `endpoint_id` string — The endpoint ID
    - `action` 'create_compute' | 'create_timeline' | 'start_compute' | 'suspend_compute' | 'apply_config' | 'check_availability' | 'delete_timeline' | 'create_branch' | 'import_data' | 'tenant_ignore' | 'tenant_attach' | 'tenant_detach' | 'tenant_detach_safekeepers' | 'tenant_attach_safekeepers' | 'tenant_reattach' | 'replace_safekeeper' | 'disable_maintenance' | 'apply_storage_config' | 'prepare_secondary_pageserver' | 'switch_pageserver' | 'detach_parent_branch' | 'timeline_archive' | 'timeline_unarchive' | 'start_reserved_compute' | 'sync_dbs_and_roles_from_compute' | 'apply_schema_from_branch' | 'timeline_mark_invisible' | 'timeline_update_protected_config' | 'prewarm_replica' | 'promote_replica' | 'set_storage_non_dirty' | 'swap_binding_id' | 'finalize_migration' | 'mark_migration_prepared' | 'update_catalog' | 'epc_sync', required — The action performed by the operation
    - `status` 'scheduling' | 'running' | 'finished' | 'failed' | 'error' | 'cancelling' | 'cancelled' | 'skipped', required — The status of the operation
    - `error` string — The error that occurred
    - `failures_count` integer, required — The number of times the operation failed
    - `retry_at` string, date-time — A timestamp indicating when the operation was last retried
    - `created_at` string, date-time, required — A timestamp indicating when the operation was created
    - `updated_at` string, date-time, required — A timestamp indicating when the operation status was last updated
    - `total_duration_ms` integer, required — The total duration of the operation in milliseconds

## Other responses

- `default` — General Error. The request may or may not be safe to retry, depending on the HTTP method, response status code, and whether a response was received. - If no response is returned from the API, a network error or timeout likely occurred. - In some cases, the request may have reached the server and been successfully processed, but the response failed to reach the client. As a result, retrying non-idempotent requests can lead to unintended results. The following HTTP methods are considered non-idempotent: `POST`, `PATCH`, `DELETE`, and `PUT`. Retrying these methods is generally **not safe**. The following methods are considered idempotent: `GET`, `HEAD`, and `OPTIONS`. Retrying these methods is **safe** in the event of a network error or timeout. Any request that returns a `503 Service Unavailable` response is always safe to retry. Any request that returns a `423 Locked` response is safe to retry. `423 Locked` indicates that the resource is temporarily locked, for example, due to another operation in progress.

---

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