> For the complete documentation index, see [llms.txt](https://docs.yottalabs.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yottalabs.ai/api-and-sdk/api-reference-v1/serverless.md).

# Serverless

## Create a Elastic deployment

> Create a Elastic deployment

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/create":{"post":{"summary":"Create a Elastic deployment","deprecated":false,"description":"Create a Elastic deployment","operationId":"endpointCreate","tags":["OpenapiElasticDeployment"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiElasticCreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultOpenapiElasticDetailResponse"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}}}}}},"components":{"schemas":{"OpenapiElasticCreateRequest":{"type":"object","description":"ElasticDeployCreateRequest","properties":{"name":{"type":"string","description":"Elastic Deployment Name","minLength":1,"pattern":"^(?=[A-Za-z])[A-Za-z0-9@._-]{1,50}$"},"imageRegistry":{"type":"string","description":"Image Registry Url"},"image":{"type":"string","description":"image","maxLength":255,"minLength":1},"resources":{"type":"array","description":"GPU resources","items":{"$ref":"#/components/schemas/OpenapiElasticResource"},"minItems":1},"minSingleCardVramInGb":{"type":"integer","format":"int32","description":"Min GPU Single Card VRAM(GB)","maximum":1536,"minimum":0},"minSingleCardVcpu":{"type":"integer","format":"int32","description":"Min GPU Single Card VCPU"},"minSingleCardRamInGb":{"type":"integer","format":"int32","description":"Min GPU Single Card RAM(GB)","maximum":1536,"minimum":0},"workers":{"type":"integer","format":"int32","description":"Workers","minimum":1},"credentialId":{"type":"string","description":"Credential Id"},"containerVolumeInGb":{"type":"integer","format":"int32","description":"Container volume(GB)","minimum":20},"initializationCommand":{"type":"string","description":"Initialization Command"},"environmentVars":{"type":"array","description":"Environment Variables","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"$ref":"#/components/schemas/OpenapiExposePort","description":"Expose"},"serviceMode":{"type":"string","description":"Service Mode(ALB,QUEUE,CUSTOM)","minLength":1},"webhookUrl":{"type":"string","description":"Webhook Url"}},"required":["containerVolumeInGb","image","name","resources","serviceMode","workers"]},"OpenapiElasticResource":{"type":"object","properties":{"region":{"type":"string","description":"Region","minLength":1},"gpuType":{"type":"string","description":"GPU Type","minLength":1},"gpuCount":{"type":"integer","format":"int32","description":"GPU Count"}},"required":["gpuCount","gpuType","region"]},"KeyValuePairDTO":{"type":"object","description":"KeyValuePairDTO","properties":{"key":{"type":"string","description":"key","minLength":1},"value":{"type":"string","description":"value","minLength":1}},"required":["key","value"]},"OpenapiExposePort":{"type":"object","description":"Expose","properties":{"port":{"type":"integer","format":"int32","description":"port","maximum":65535,"minimum":1},"protocol":{"type":"string","description":"protocol"}},"required":["port"]},"ResultOpenapiElasticDetailResponse":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/OpenapiElasticDetailResponse","description":"data"}}},"OpenapiElasticDetailResponse":{"type":"object","description":"ElasticDetail","properties":{"id":{"type":"string","description":"Elastic Deployment ID"},"name":{"type":"string"},"creator":{"type":"string"},"domain":{"type":"string"},"imageRegistry":{"type":"string"},"image":{"type":"string"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/OpenapiElasticResourceResponse"}},"minSingleCardVramInGb":{"type":"integer","format":"int32"},"minSingleCardVcpu":{"type":"integer","format":"int32"},"minSingleCardRamInGb":{"type":"integer","format":"int32"},"credentialId":{"type":"integer","format":"int64"},"containerVolumeInGb":{"type":"integer","format":"int32"},"initializationCommand":{"type":"string"},"environmentVars":{"type":"array","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"$ref":"#/components/schemas/OpenapiExposePortResponse"},"totalWorkers":{"type":"integer","format":"int32"},"runningWorkers":{"type":"integer","format":"int32"},"cost":{"type":"number"},"perSecondPrice":{"type":"number"},"perHourPrice":{"type":"number"},"serviceMode":{"type":"string"},"webhookUrl":{"type":"string"},"status":{"type":"string"}}},"OpenapiElasticResourceResponse":{"type":"object","description":"ElasticResource","properties":{"region":{"type":"string","description":"Region"},"regionDisplayName":{"type":"string","description":"Region Display Name"},"gpuType":{"type":"string","description":"GPU Type"},"gpuDisplayName":{"type":"string","description":"GPU DisplayName"},"gpuCount":{"type":"integer","format":"int32","description":"GPU Count"},"singleCardVramInGb":{"type":"integer","format":"int32","description":"GPU Single Card VRAM(GB)"},"singleCardVcpu":{"type":"integer","format":"int32","description":"GPU Single Card VCPU"},"singleCardRamInGb":{"type":"integer","format":"int32","description":"GPU Single Card RAM(GB)"}}},"OpenapiExposePortResponse":{"type":"object","description":"ElasticExpose","properties":{"port":{"type":"integer","format":"int32","description":"port"},"protocol":{"type":"string","description":"protocol"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Update a Elastic deployment

> Update a specific Elastic deployment

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}/update":{"post":{"summary":"Update a Elastic deployment","deprecated":false,"description":"Update a specific Elastic deployment","operationId":"endpointUpdate","tags":["OpenapiElasticDeployment"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiElasticUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultOpenapiElasticDetailResponse"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}}}}}},"components":{"schemas":{"OpenapiElasticUpdateRequest":{"type":"object","description":"ElasticDeployUpdateRequest","properties":{"name":{"type":"string","description":"Elastic Deployment Name","minLength":1,"pattern":"^(?=[A-Za-z])[A-Za-z0-9@._-]{1,50}$"},"resources":{"type":"array","description":"GPU resources","items":{"$ref":"#/components/schemas/OpenapiElasticResource"},"minItems":1},"minSingleCardVramInGb":{"type":"integer","format":"int32","description":"Min GPU Single Card VRAM(GB)"},"minSingleCardVcpu":{"type":"integer","format":"int32","description":"Min GPU Single Card VCPU"},"minSingleCardRamInGb":{"type":"integer","format":"int32","description":"Min GPU Single Card RAM(GB)"},"workers":{"type":"integer","format":"int32","description":"Workers","minimum":1},"credentialId":{"type":"string","description":"Credential Id"},"containerVolumeInGb":{"type":"integer","format":"int32","description":"Container volume(GB)","minimum":20},"initializationCommand":{"type":"string","description":"Initialization Command"},"environmentVars":{"type":"array","description":"Environment Variables","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"$ref":"#/components/schemas/OpenapiExposePort","description":"Expose"},"webhookUrl":{"type":"string","description":"Webhook Url"}},"required":["containerVolumeInGb","name","resources","workers"]},"OpenapiElasticResource":{"type":"object","properties":{"region":{"type":"string","description":"Region","minLength":1},"gpuType":{"type":"string","description":"GPU Type","minLength":1},"gpuCount":{"type":"integer","format":"int32","description":"GPU Count"}},"required":["gpuCount","gpuType","region"]},"KeyValuePairDTO":{"type":"object","description":"KeyValuePairDTO","properties":{"key":{"type":"string","description":"key","minLength":1},"value":{"type":"string","description":"value","minLength":1}},"required":["key","value"]},"OpenapiExposePort":{"type":"object","description":"Expose","properties":{"port":{"type":"integer","format":"int32","description":"port","maximum":65535,"minimum":1},"protocol":{"type":"string","description":"protocol"}},"required":["port"]},"ResultOpenapiElasticDetailResponse":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/OpenapiElasticDetailResponse","description":"data"}}},"OpenapiElasticDetailResponse":{"type":"object","description":"ElasticDetail","properties":{"id":{"type":"string","description":"Elastic Deployment ID"},"name":{"type":"string"},"creator":{"type":"string"},"domain":{"type":"string"},"imageRegistry":{"type":"string"},"image":{"type":"string"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/OpenapiElasticResourceResponse"}},"minSingleCardVramInGb":{"type":"integer","format":"int32"},"minSingleCardVcpu":{"type":"integer","format":"int32"},"minSingleCardRamInGb":{"type":"integer","format":"int32"},"credentialId":{"type":"integer","format":"int64"},"containerVolumeInGb":{"type":"integer","format":"int32"},"initializationCommand":{"type":"string"},"environmentVars":{"type":"array","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"$ref":"#/components/schemas/OpenapiExposePortResponse"},"totalWorkers":{"type":"integer","format":"int32"},"runningWorkers":{"type":"integer","format":"int32"},"cost":{"type":"number"},"perSecondPrice":{"type":"number"},"perHourPrice":{"type":"number"},"serviceMode":{"type":"string"},"webhookUrl":{"type":"string"},"status":{"type":"string"}}},"OpenapiElasticResourceResponse":{"type":"object","description":"ElasticResource","properties":{"region":{"type":"string","description":"Region"},"regionDisplayName":{"type":"string","description":"Region Display Name"},"gpuType":{"type":"string","description":"GPU Type"},"gpuDisplayName":{"type":"string","description":"GPU DisplayName"},"gpuCount":{"type":"integer","format":"int32","description":"GPU Count"},"singleCardVramInGb":{"type":"integer","format":"int32","description":"GPU Single Card VRAM(GB)"},"singleCardVcpu":{"type":"integer","format":"int32","description":"GPU Single Card VCPU"},"singleCardRamInGb":{"type":"integer","format":"int32","description":"GPU Single Card RAM(GB)"}}},"OpenapiExposePortResponse":{"type":"object","description":"ElasticExpose","properties":{"port":{"type":"integer","format":"int32","description":"port"},"protocol":{"type":"string","description":"protocol"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Stop a Elastic deployment

> Stop a specific Elastic deployment

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}/stop":{"post":{"summary":"Stop a Elastic deployment","deprecated":false,"description":"Stop a specific Elastic deployment","operationId":"endpointStop","tags":["OpenapiElasticDeployment"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVoid"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}}}}}},"components":{"schemas":{"ResultVoid":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Scale Elastic Deployment Workers

> Adjust the number of workers for a specific elastic deployment.

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}/workers":{"post":{"summary":"Scale Elastic Deployment Workers","deprecated":false,"description":"Adjust the number of workers for a specific elastic deployment.","operationId":"endpointScale","tags":["OpenapiElasticDeployment"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiElasticWorkerScaleRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVoid"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}}}}}},"components":{"schemas":{"OpenapiElasticWorkerScaleRequest":{"type":"object","description":"OpenapiScaleWorkersRequest","properties":{"workers":{"type":"integer","format":"int32","description":"workers"}},"required":["workers"]},"ResultVoid":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Start or resume a Elastic deployment

> Start or resume a specific Elastic deployment

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}/start":{"post":{"summary":"Start or resume a Elastic deployment","deprecated":false,"description":"Start or resume a specific Elastic deployment","operationId":"endpointStart","tags":["OpenapiElasticDeployment"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVoid"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}}}}}},"components":{"schemas":{"ResultVoid":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Delete a Elastic deployment

> Delete a specific Elastic deployment

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}":{"delete":{"summary":"Delete a Elastic deployment","deprecated":false,"description":"Delete a specific Elastic deployment","operationId":"endpointDelete_2","tags":["OpenapiElasticDeployment"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVoid"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}}}}}},"components":{"schemas":{"ResultVoid":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Get all Elastic deployments

> Get all Elastic deployments list

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/list":{"get":{"summary":"Get all Elastic deployments","deprecated":false,"description":"Get all Elastic deployments list","operationId":"endpointList_1","tags":["OpenapiElasticDeployment"],"parameters":[{"name":"statusList","in":"query","description":"","required":false,"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultListOpenapiElasticDetailResponse"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}}}}}},"components":{"schemas":{"ResultListOpenapiElasticDetailResponse":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"type":"array","description":"data","items":{"$ref":"#/components/schemas/OpenapiElasticDetailResponse"}}}},"OpenapiElasticDetailResponse":{"type":"object","description":"ElasticDetail","properties":{"id":{"type":"string","description":"Elastic Deployment ID"},"name":{"type":"string"},"creator":{"type":"string"},"domain":{"type":"string"},"imageRegistry":{"type":"string"},"image":{"type":"string"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/OpenapiElasticResourceResponse"}},"minSingleCardVramInGb":{"type":"integer","format":"int32"},"minSingleCardVcpu":{"type":"integer","format":"int32"},"minSingleCardRamInGb":{"type":"integer","format":"int32"},"credentialId":{"type":"integer","format":"int64"},"containerVolumeInGb":{"type":"integer","format":"int32"},"initializationCommand":{"type":"string"},"environmentVars":{"type":"array","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"$ref":"#/components/schemas/OpenapiExposePortResponse"},"totalWorkers":{"type":"integer","format":"int32"},"runningWorkers":{"type":"integer","format":"int32"},"cost":{"type":"number"},"perSecondPrice":{"type":"number"},"perHourPrice":{"type":"number"},"serviceMode":{"type":"string"},"webhookUrl":{"type":"string"},"status":{"type":"string"}}},"OpenapiElasticResourceResponse":{"type":"object","description":"ElasticResource","properties":{"region":{"type":"string","description":"Region"},"regionDisplayName":{"type":"string","description":"Region Display Name"},"gpuType":{"type":"string","description":"GPU Type"},"gpuDisplayName":{"type":"string","description":"GPU DisplayName"},"gpuCount":{"type":"integer","format":"int32","description":"GPU Count"},"singleCardVramInGb":{"type":"integer","format":"int32","description":"GPU Single Card VRAM(GB)"},"singleCardVcpu":{"type":"integer","format":"int32","description":"GPU Single Card VCPU"},"singleCardRamInGb":{"type":"integer","format":"int32","description":"GPU Single Card RAM(GB)"}}},"KeyValuePairDTO":{"type":"object","description":"KeyValuePairDTO","properties":{"key":{"type":"string","description":"key","minLength":1},"value":{"type":"string","description":"value","minLength":1}},"required":["key","value"]},"OpenapiExposePortResponse":{"type":"object","description":"ElasticExpose","properties":{"port":{"type":"integer","format":"int32","description":"port"},"protocol":{"type":"string","description":"protocol"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Query worker logs

> Query worker logs with pagination

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}/workers/{workerId}/logs":{"get":{"summary":"Query worker logs","deprecated":false,"description":"Query worker logs with pagination","operationId":"queryWorkerLogs","tags":["OpenapiElasticDeployment"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"workerId","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"pageSize","in":"query","description":"","required":false,"schema":{"type":"integer","format":"int32","default":100}},{"name":"keyword","in":"query","description":"","required":false,"schema":{"type":"string"}},{"name":"startTime","in":"query","description":"","required":false,"schema":{"type":"string"}},{"name":"endTime","in":"query","description":"","required":false,"schema":{"type":"string"}},{"name":"searchAfterTime","in":"query","description":"","required":false,"schema":{"type":"string"}},{"name":"searchAfterOffset","in":"query","description":"","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"direction","in":"query","description":"","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultOpenapiLogResponse"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}}}}}},"components":{"schemas":{"ResultOpenapiLogResponse":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/OpenapiLogResponse","description":"data"}}},"OpenapiLogResponse":{"type":"object","properties":{"logs":{"type":"array","items":{"$ref":"#/components/schemas/Log"}},"hasMore":{"type":"boolean"},"nextSearchAfterTime":{"type":"string"},"nextSearchAfterOffset":{"type":"string"}}},"Log":{"type":"object","properties":{"timestamp":{"type":"string"},"log":{"type":"string"},"offset":{"type":"integer","format":"int64"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Get Elastic deployment detail

> Retrieve detailed information of a specific elastic deployment by ID.

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}":{"get":{"summary":"Get Elastic deployment detail","deprecated":false,"description":"Retrieve detailed information of a specific elastic deployment by ID.","operationId":"endpointDetail","tags":["OpenapiElasticDeployment"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultOpenapiElasticDetailResponse"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}}}}}},"components":{"schemas":{"ResultOpenapiElasticDetailResponse":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/OpenapiElasticDetailResponse","description":"data"}}},"OpenapiElasticDetailResponse":{"type":"object","description":"ElasticDetail","properties":{"id":{"type":"string","description":"Elastic Deployment ID"},"name":{"type":"string"},"creator":{"type":"string"},"domain":{"type":"string"},"imageRegistry":{"type":"string"},"image":{"type":"string"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/OpenapiElasticResourceResponse"}},"minSingleCardVramInGb":{"type":"integer","format":"int32"},"minSingleCardVcpu":{"type":"integer","format":"int32"},"minSingleCardRamInGb":{"type":"integer","format":"int32"},"credentialId":{"type":"integer","format":"int64"},"containerVolumeInGb":{"type":"integer","format":"int32"},"initializationCommand":{"type":"string"},"environmentVars":{"type":"array","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"$ref":"#/components/schemas/OpenapiExposePortResponse"},"totalWorkers":{"type":"integer","format":"int32"},"runningWorkers":{"type":"integer","format":"int32"},"cost":{"type":"number"},"perSecondPrice":{"type":"number"},"perHourPrice":{"type":"number"},"serviceMode":{"type":"string"},"webhookUrl":{"type":"string"},"status":{"type":"string"}}},"OpenapiElasticResourceResponse":{"type":"object","description":"ElasticResource","properties":{"region":{"type":"string","description":"Region"},"regionDisplayName":{"type":"string","description":"Region Display Name"},"gpuType":{"type":"string","description":"GPU Type"},"gpuDisplayName":{"type":"string","description":"GPU DisplayName"},"gpuCount":{"type":"integer","format":"int32","description":"GPU Count"},"singleCardVramInGb":{"type":"integer","format":"int32","description":"GPU Single Card VRAM(GB)"},"singleCardVcpu":{"type":"integer","format":"int32","description":"GPU Single Card VCPU"},"singleCardRamInGb":{"type":"integer","format":"int32","description":"GPU Single Card RAM(GB)"}}},"KeyValuePairDTO":{"type":"object","description":"KeyValuePairDTO","properties":{"key":{"type":"string","description":"key","minLength":1},"value":{"type":"string","description":"value","minLength":1}},"required":["key","value"]},"OpenapiExposePortResponse":{"type":"object","description":"ElasticExpose","properties":{"port":{"type":"integer","format":"int32","description":"port"},"protocol":{"type":"string","description":"protocol"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Get all workers of a Elastic deployment

> Get all workers of a specific Elastic deployment

```json
{"openapi":"3.0.1","info":{"title":"默认模块","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}/workers":{"get":{"summary":"Get all workers of a Elastic deployment","deprecated":false,"description":"Get all workers of a specific Elastic deployment","operationId":"endpointWorkers","tags":["OpenapiElasticDeployment"],"parameters":[{"name":"id","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"statusList","in":"query","description":"","required":false,"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultListOpenapiElasticWorkerResponse"}}},"headers":{}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}},"headers":{}}}}}},"components":{"schemas":{"ResultListOpenapiElasticWorkerResponse":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"type":"array","description":"data","items":{"$ref":"#/components/schemas/OpenapiElasticWorkerResponse"}}}},"OpenapiElasticWorkerResponse":{"type":"object","description":"ElasticWorker","properties":{"id":{"type":"string","description":"Worker ID"},"region":{"type":"string","description":"Region"},"regionDisplayName":{"type":"string","description":"Region Display Name"},"gpuType":{"type":"string","description":"GPU Type"},"gpuDisplayName":{"type":"string","description":"GPU DisplayName"},"gpuCount":{"type":"integer","format":"int32","description":"GPU Count"},"singleCardVramInGb":{"type":"integer","format":"int32","description":"GPU Single Card VRAM(GB)"},"singleCardVcpu":{"type":"integer","format":"int32","description":"GPU Single Card VCPU"},"singleCardRamInGb":{"type":"integer","format":"int32","description":"GPU Single Card RAM(GB)"},"uptime":{"type":"integer","format":"int64","description":"Uptime(Milliseconds)"},"cost":{"type":"number","description":"Cost(Dollars)"},"status":{"type":"string","description":"Status"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.yottalabs.ai/api-and-sdk/api-reference-v1/serverless.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
