(models)
OpenAI's API models v1 endpoint
This endpoint mimics the OpenAI models endpoint format, returning a list of available models with their associated metadata. Each model includes standard OpenAI-compatible fields to ensure compatibility with existing OpenAI client libraries.
from atoma_sdk import AtomaSDK
import os
with AtomaSDK(
bearer_auth=os.getenv("ATOMASDK_BEARER_AUTH", ""),
) as as_client:
res = as_client.models.list()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models.APIError | 4XX, 5XX | */* |
This endpoint returns a list of available models from the OpenRouter models file. The file is expected to be in JSON format and contains information about the models, including their IDs and other metadata.
from atoma_sdk import AtomaSDK
import os
with AtomaSDK(
bearer_auth=os.getenv("ATOMASDK_BEARER_AUTH", ""),
) as as_client:
res = as_client.models.get_all()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models.APIError | 4XX, 5XX | */* |