Coroutine-native client covering the full Hanzo /v1 cloud surface, for JVM and Android. Generated with openapi-generator kotlin (library=jvm-okhttp4, useCoroutines=true). Coordinate: ai.hanzo:sdk. Base URL: https://api.hanzo.ai. Co-authored-by: Hanzo Dev <[email protected]>
27 KiB
ModelsApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| aiListModels | GET /v1/models | List available models |
| aiRetrieveModel | GET /v1/models/{model} | Retrieve a model |
| chatGetModels | GET /v1/chat/models | List available models |
| consoleCreateModel | POST /v1/console/models | Create a model definition |
| consoleDeleteModel | DELETE /v1/console/models/{id} | Delete a model |
| consoleGetModel | GET /v1/console/models/{id} | Get a model by ID |
| consoleListModels | GET /v1/console/models | Get all models |
| gatewayGetModel | GET /v1/gateway/models/{model} | Get model |
| gatewayListModels | GET /v1/gateway/models | List models |
| mlGetModel | GET /v1/ml/models/{model_id} | Get model details |
| mlListModels | GET /v1/ml/models | List models |
| mlPromoteModel | POST /v1/ml/models/{model_id}/promote | Promote a model |
| mlRegisterModel | POST /v1/ml/models | Register a model |
| mlRollbackModel | POST /v1/ml/models/{model_id}/rollback | Rollback a model |
| pricingGetFullPricing | GET /v1/pricing | Full pricing data |
| pricingGetModel | GET /v1/pricing/model/{name} | Single model lookup |
| pricingGetPricingSummary | GET /v1/pricing/summary | Model counts and provider breakdown |
| pricingListFeaturedModels | GET /v1/pricing/featured | Featured third-party models |
| pricingListFreeModels | GET /v1/pricing/free | Free models only |
| pricingListModels | GET /v1/pricing/models | List all AI models (OpenAI-compatible) |
| pricingListProviders | GET /v1/pricing/providers | Provider breakdown |
aiListModels
AiModelList aiListModels()
List available models
OpenAI-compatible model list across every routable provider.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
try {
val result : AiModelList = apiInstance.aiListModels()
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#aiListModels")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#aiListModels")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
aiRetrieveModel
AiModel aiRetrieveModel(model)
Retrieve a model
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
val model : kotlin.String = model_example // kotlin.String |
try {
val result : AiModel = apiInstance.aiRetrieveModel(model)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#aiRetrieveModel")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#aiRetrieveModel")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| model | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
chatGetModels
kotlin.collections.Map<kotlin.String, kotlin.collections.List<kotlin.String>> chatGetModels()
List available models
Returns models grouped by endpoint.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
try {
val result : kotlin.collections.Map<kotlin.String, kotlin.collections.List<kotlin.String>> = apiInstance.chatGetModels()
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#chatGetModels")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#chatGetModels")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
kotlin.collections.Map<kotlin.String, kotlin.collections.List<kotlin.String>>
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
consoleCreateModel
ConsoleModel consoleCreateModel(consoleCreateModelRequest)
Create a model definition
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
val consoleCreateModelRequest : ConsoleCreateModelRequest = // ConsoleCreateModelRequest |
try {
val result : ConsoleModel = apiInstance.consoleCreateModel(consoleCreateModelRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#consoleCreateModel")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#consoleCreateModel")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| consoleCreateModelRequest | ConsoleCreateModelRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
consoleDeleteModel
kotlin.Any consoleDeleteModel(id)
Delete a model
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
val id : kotlin.String = id_example // kotlin.String |
try {
val result : kotlin.Any = apiInstance.consoleDeleteModel(id)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#consoleDeleteModel")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#consoleDeleteModel")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
consoleGetModel
ConsoleModel consoleGetModel(id)
Get a model by ID
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
val id : kotlin.String = id_example // kotlin.String |
try {
val result : ConsoleModel = apiInstance.consoleGetModel(id)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#consoleGetModel")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#consoleGetModel")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
consoleListModels
ConsoleListModels200Response consoleListModels(page, limit)
Get all models
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
val page : kotlin.Int = 56 // kotlin.Int |
val limit : kotlin.Int = 56 // kotlin.Int |
try {
val result : ConsoleListModels200Response = apiInstance.consoleListModels(page, limit)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#consoleListModels")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#consoleListModels")
e.printStackTrace()
}
Parameters
| page | kotlin.Int| | [optional] |
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | kotlin.Int | [optional] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
gatewayGetModel
GatewayModel gatewayGetModel(model)
Get model
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
val model : kotlin.String = model_example // kotlin.String |
try {
val result : GatewayModel = apiInstance.gatewayGetModel(model)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#gatewayGetModel")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#gatewayGetModel")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| model | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
gatewayListModels
GatewayListModels200Response gatewayListModels()
List models
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
try {
val result : GatewayListModels200Response = apiInstance.gatewayListModels()
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#gatewayListModels")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#gatewayListModels")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
mlGetModel
MlModel mlGetModel(modelId)
Get model details
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
val modelId : kotlin.String = modelId_example // kotlin.String |
try {
val result : MlModel = apiInstance.mlGetModel(modelId)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#mlGetModel")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#mlGetModel")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| modelId | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
mlListModels
MlListModels200Response mlListModels(stage, search)
List models
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
val stage : kotlin.String = stage_example // kotlin.String |
val search : kotlin.String = search_example // kotlin.String |
try {
val result : MlListModels200Response = apiInstance.mlListModels(stage, search)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#mlListModels")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#mlListModels")
e.printStackTrace()
}
Parameters
| stage | kotlin.String| | [optional] [enum: dev, staging, canary, production] |
| Name | Type | Description | Notes |
|---|---|---|---|
| search | kotlin.String | [optional] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
mlPromoteModel
MlModel mlPromoteModel(modelId, mlPromoteModelRequest)
Promote a model
Promote a model to the next deployment stage.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
val modelId : kotlin.String = modelId_example // kotlin.String |
val mlPromoteModelRequest : MlPromoteModelRequest = // MlPromoteModelRequest |
try {
val result : MlModel = apiInstance.mlPromoteModel(modelId, mlPromoteModelRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#mlPromoteModel")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#mlPromoteModel")
e.printStackTrace()
}
Parameters
| modelId | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| mlPromoteModelRequest | MlPromoteModelRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
mlRegisterModel
MlModel mlRegisterModel(mlRegisterModelRequest)
Register a model
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
val mlRegisterModelRequest : MlRegisterModelRequest = // MlRegisterModelRequest |
try {
val result : MlModel = apiInstance.mlRegisterModel(mlRegisterModelRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#mlRegisterModel")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#mlRegisterModel")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| mlRegisterModelRequest | MlRegisterModelRequest |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
mlRollbackModel
mlRollbackModel(modelId, mlRollbackModelRequest)
Rollback a model
Rollback to a previous model version.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
val modelId : kotlin.String = modelId_example // kotlin.String |
val mlRollbackModelRequest : MlRollbackModelRequest = // MlRollbackModelRequest |
try {
apiInstance.mlRollbackModel(modelId, mlRollbackModelRequest)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#mlRollbackModel")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#mlRollbackModel")
e.printStackTrace()
}
Parameters
| modelId | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| mlRollbackModelRequest | MlRollbackModelRequest |
Return type
null (empty response body)
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
pricingGetFullPricing
PricingFullPricingResponse pricingGetFullPricing()
Full pricing data
Returns the complete pricing dataset including all AI models, tools, infrastructure, and cloud plans. Large response (~500KB).
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
try {
val result : PricingFullPricingResponse = apiInstance.pricingGetFullPricing()
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#pricingGetFullPricing")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#pricingGetFullPricing")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
pricingGetModel
PricingModel pricingGetModel(name)
Single model lookup
Look up a single model by name or ID. Case-insensitive matching. Returns full model details including pricing, specs, and features.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
val name : kotlin.String = zen4 // kotlin.String | Model name or ID (case-insensitive)
try {
val result : PricingModel = apiInstance.pricingGetModel(name)
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#pricingGetModel")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#pricingGetModel")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | kotlin.String | Model name or ID (case-insensitive) |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
pricingGetPricingSummary
PricingSummaryResponse pricingGetPricingSummary()
Model counts and provider breakdown
Returns aggregate statistics: model counts by category, number of providers, and provider breakdown.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
try {
val result : PricingSummaryResponse = apiInstance.pricingGetPricingSummary()
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#pricingGetPricingSummary")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#pricingGetPricingSummary")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
pricingListFeaturedModels
PricingPricingModelsResponse pricingListFeaturedModels()
Featured third-party models
Returns curated featured models from third-party providers.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
try {
val result : PricingPricingModelsResponse = apiInstance.pricingListFeaturedModels()
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#pricingListFeaturedModels")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#pricingListFeaturedModels")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
pricingListFreeModels
PricingPricingModelsResponse pricingListFreeModels()
Free models only
Returns models with zero cost (free tier eligible).
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
try {
val result : PricingPricingModelsResponse = apiInstance.pricingListFreeModels()
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#pricingListFreeModels")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#pricingListFreeModels")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
pricingListModels
PricingModelListResponse pricingListModels()
List all AI models (OpenAI-compatible)
Returns all available AI models in an OpenAI-compatible format. Includes 32 Zen (Hanzo first-party) models and 344+ third-party models from providers like OpenAI, Anthropic, Google, Meta, etc.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
try {
val result : PricingModelListResponse = apiInstance.pricingListModels()
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#pricingListModels")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#pricingListModels")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
pricingListProviders
PricingProvidersResponse pricingListProviders()
Provider breakdown
Returns all model providers with counts.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ModelsApi()
try {
val result : PricingProvidersResponse = apiInstance.pricingListProviders()
println(result)
} catch (e: ClientException) {
println("4xx response calling ModelsApi#pricingListProviders")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ModelsApi#pricingListProviders")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json