---
title: "Create endpoint from W&B artifact"
method: POST
path: "/dedicated/endpoint/wandb-artifact-create"
tags: ["Dedicated.Endpoint"]
---

# Create endpoint from W&B artifact

`POST /dedicated/endpoint/wandb-artifact-create`

## Request

- Base URL: `https://api.friendli.ai`
- URL: `https://api.friendli.ai/dedicated/endpoint/wandb-artifact-create`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/friendli/apis/friendli-suite-api-reference/docs/dedicated/endpoint/wandb-artifact-create/post.ts> (a function with typed inputs; its response is checked against the schema)

Create an endpoint from Weights & Biases artifact. If the idempotency key is provided, the API will check if the endpoint already exists, and rollout the existing endpoint if it does. In such cases, the project id must be provided.

## Headers

- `X-Friendli-Team` string, nullable: ID of team to run requests as (optional parameter).

## Request body

- DedicatedEndpointWandbArtifactCreateBody: Endpoint create request.
  - `wandbArtifactVersionName` string, required: The specific model artifact version from Weights & Biases. The referred artifact will be used to create a new endpoint in Friendli Dedicated Endpoints or rollout an existing one.
  - `accelerator` AcceleratorRequirement: Accelerator requirement.
    - `type` string, required: Specifies the instance type.
    - `count` integer, required: Specifies the number of instances.
  - `name` string, nullable: Specifies the name of your endpoint. If not provided, a name will be automatically generated for you.
  - `projectId` string, nullable: Specifies where endpoint will be created in your Friendli Dedicated Endpoints. If not provided, a new project will be created within your default team.
  - `idempotencyKey` string, nullable: Used by Friendli Dedicated Endpoints to track which webhook automation triggered an endpoint rollout. If the `idempotencyKey` is provided, the API will check if the endpoint already exists, and rollout the existing endpoint if it does. In such cases, the `projectId` must be provided. Any unique value can be used.
  - `autoscalingPolicy` AutoscalingPolicy: Autoscaling policy.
    - `minReplica` integer: Setting `minReplica` to 0 allows the endpoint to sleep when idle, reducing costs. The minimum value is 0.
    - `maxReplica` integer: The maximum replicas that the endpoint can scale up to. The maximum value is 10.
    - `cooldownPeriod` integer: Determines how long the endpoint waits before scaling down after the last request.

## Response `200`

Successfully created the endpoint from W&B artifact.

- DedicatedEndpointWandbArtifactCreateResponse: Endpoint create response.
  - `endpointId` string, required: The ID of the created endpoint.
  - `endpointName` string, required: The name of the created endpoint.
  - `projectId` string, required: The ID of the project where the endpoint was created.
  - `projectName` string, required: The name of the project where the endpoint was created.
  - `teamId` string, required: The ID of the team where the endpoint was created.
  - `teamName` string, nullable, required: The name of the team where the endpoint was created.

## Other responses

- `400`: Bad Request
- `422`: Unprocessable Entity

---

[API](https://skmtc.dev/friendli/apis/friendli-suite-api-reference.md) - [All operations](https://skmtc.dev/friendli/apis/friendli-suite-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/friendli/apis/friendli-suite-api-reference/revisions/38fb43993a11?raw)
