POST
/serving/model/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/serving/model/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "name": "string", "storage_type": "managed", "bucket_name": "string", "model_type": "pytorch", "access_key": "string", "secret_key": "string"}'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/gpu/serving/model/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "name": "string", "storage_type": "managed", "bucket_name": "string", "model_type": "pytorch", "access_key": "string", "secret_key": "string", },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/serving/model/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "name": "string", "storage_type": "managed", "bucket_name": "string", "model_type": "pytorch", "access_key": "string", "secret_key": "string" }),});console.log(await response.json());Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”project_id
required
integer
Project ID
active_iam
integer
Active IAM ID (To access contact person account) Find your Active IAM ID here
location
required
string
Location
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
One of:
object
name
The name of the bucket
string
storage_type
The storage type for the bucket
string
bucket_name
The bucket name (empty for managed)
string
model_type
The model type
string
access_key
Access key for authentication
string
secret_key
Secret key for authentication
string
object
name
The name of the bucket
string
storage_type
The storage type for the bucket
string
bucket_name
The existing bucket name
string
model_type
The model type
string
access_key
Access key for authentication
string
secret_key
Secret key for authentication
string
object
name
The name of the bucket
string
storage_type
The storage type for the external bucket
string
bucket_name
The external bucket name
string
model_type
The model type
string
access_key
Access key for authentication to the external bucket
string
secret_key
Secret key for authentication to the external bucket
string
Responses
Section titled “Responses”Model created successfully
Media typeapplication/json
object
code
integer
message
string
data
object
id
integer
name
string
project_id
integer
description
string
model_type
string
bucket
object
id
integer
bucket_name
string
bucket_url
string
endpoint
string
is_managed
boolean
eos_bucket_permission_id
integer
status
string
created_by
object
id
integer
name
string
email
string
username
string
created_at
string format: date-time
updated_at
string format: date-time
access_key
object
id
integer
access_key
string
secret_key
string
tag
string
is_managed
boolean
errors
object
Example
{ "code": 201, "message": "Created Successfully", "data": { "id": 1243, "name": "adahfihhhhhh", "project_id": 124, "description": null, "model_type": "pytorch", "bucket": { "id": 2518, "bucket_name": "adahfihhhhhh-a64d9e", "bucket_url": "s3://adahfihhhhhh-a64d9e/", "endpoint": "https://objectstore.e2enetworks.net", "is_managed": true, "eos_bucket_permission_id": 10204 }, "status": "OK", "created_by": { "id": 3573, "name": "Nipun", "email": "nipun.arora@e2enetworks.com", "username": "nipun.arora@e2enetworks.com" }, "created_at": "2024-11-14T09:42:01.554549Z", "updated_at": "2024-11-14T09:42:01.554608Z", "access_key": { "id": 2535, "access_key": "6AAYVBO46X8N1V3VGY81", "secret_key": "M5GDFOSIH5H5SWUK8FC2ELD8Y07H47OGQQM13IYT", "tag": "akgpued8b358bcb6a4d9d94255d3092f4b8b4", "is_managed": true } }, "errors": {}}