Create Serverless Endpoint
curl --request POST \
  --url https://api.tensorone.ai/v2/endpoints \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "templateId": "<string>",
  "gpuIds": [
    "<string>"
  ],
  "workerCount": 1
}'
{
  "id": "<string>",
  "name": "<string>",
  "status": "active",
  "url": "<string>",
  "templateId": "<string>",
  "gpuType": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}
Create a new serverless endpoint that can execute your AI models on-demand. Endpoints are created from templates and can be scaled with multiple workers.

Required Parameters

  • name: Human-readable name for the endpoint (1-100 characters)
  • templateId: ID of the template to use for the endpoint
  • gpuIds: Array of GPU IDs to allocate to the endpoint

Optional Parameters

  • workerCount: Number of workers (1-10, default: 1)

Example Usage

curl -X POST "https://api.tensorone.ai/v2/endpoints" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-image-generator",
    "templateId": "tpl_stable_diffusion_xl",
    "gpuIds": ["gpu_nvidia_a100_1"],
    "workerCount": 2
  }'

Response

Returns the created endpoint object:
{
    "id": "ep_1234567890abcdef",
    "name": "my-image-generator",
    "status": "pending",
    "url": "https://api.tensorone.ai/v2/ep_1234567890abcdef/runsync",
    "templateId": "tpl_stable_diffusion_xl",
    "gpuType": "NVIDIA A100",
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:30:00Z"
}
Endpoint creation is asynchronous. The endpoint will show pending status while being provisioned, then transition to active when ready to accept requests.

Authorizations

Authorization
string
header
required

API key authentication. Use 'Bearer YOUR_API_KEY' format.

Body

application/json

Endpoint configuration

The body is of type object.

Response

Endpoint created successfully

The response is of type object.