# Docs for v2 can be found by changing the above selector ^
from together import Together
import os
client = Together(
api_key=os.environ.get("TOGETHER_API_KEY"),
)
endpoints = client.endpoints.list()
for endpoint in endpoints:
print(endpoint.id){
"object": "list",
"data": [
{
"object": "endpoint",
"id": "endpoint-5c0c20db-62fe-4f41-8ffc-d9e4ea1a264e",
"name": "allenai/OLMo-7B",
"model": "allenai/OLMo-7B",
"type": "serverless",
"owner": "together",
"state": "STARTED",
"created_at": "2024-02-28T21:34:35.444Z"
}
]
}Returns a list of all endpoints associated with your account. You can filter the results by type (dedicated or serverless).
# Docs for v2 can be found by changing the above selector ^
from together import Together
import os
client = Together(
api_key=os.environ.get("TOGETHER_API_KEY"),
)
endpoints = client.endpoints.list()
for endpoint in endpoints:
print(endpoint.id){
"object": "list",
"data": [
{
"object": "endpoint",
"id": "endpoint-5c0c20db-62fe-4f41-8ffc-d9e4ea1a264e",
"name": "allenai/OLMo-7B",
"model": "allenai/OLMo-7B",
"type": "serverless",
"owner": "together",
"state": "STARTED",
"created_at": "2024-02-28T21:34:35.444Z"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Filter endpoints by type
dedicated, serverless Filter endpoints by usage type
on-demand, reserved If true, return only endpoints owned by the caller
200
list Show child attributes
The type of object
endpoint "endpoint"
Unique identifier for the endpoint
"endpoint-d23901de-ef8f-44bf-b3e7-de9c1ca8f2d7"
System name for the endpoint
"allenai/OLMo-7B"
The model deployed on this endpoint
"allenai/OLMo-7B"
The type of endpoint
serverless, dedicated "serverless"
The owner of this endpoint
"together"
Current state of the endpoint
PENDING, STARTING, STARTED, STOPPING, STOPPED, ERROR "STARTED"
Timestamp when the endpoint was created
"2024-02-28T21:34:35.444Z"
Was this page helpful?