
"definitions":
  "create_deployment_body":
    "properties":
      "model_id":
        "description": "Model to deploy"
        "type": "string"
      "name":
        "description": "Name of the deployment, *cannot contain non-alphanumeric characters other than '-' or uppercase letters"
        "require": true
        "type": "string"
      "node_spec":
        "description": "Node spec (A10/A100) to deploy on, default to A10"
        "type": "string"
      "type":
        "description": "Type of deployment (dedicated or shared)"
        "type": "string"
  "generate_token_body":
    "properties":
      "deployment_id":
        "description": "id of deployment to be accessed and generate token from"
        "type": "string"
      "frequency_penalty":
        "description": "Frequency penalty for generation"
        "type": "float"
      "input":
        "description": "Input to generate token for"
        "type": "string"
      "max_tokens":
        "description": "Max tokens for generation"
        "type": "integer"
      "presence_penalty":
        "description": "Presence penalty for generation"
        "type": "float"
      "temperature":
        "description": "Temperature for generation"
        "type": "float"
      "top_p":
        "description": "Top p for generation"
        "type": "float"
      "user_id":
        "description": "User ID to generate token for"
        "type": "string"
  "shared_model_generate_body":
    "properties":
      "frequency_penalty":
        "default": 0
        "description": "Frequency penalty for generation"
        "type": "float"
      "input":
        "description": "Text to generate"
        "type": "string"
      "max_tokens":
        "default": 400
        "description": "Max tokens for generation"
        "type": "integer"
      "model_id":
        "description": "Model ID"
        "type": "string"
      "presence_penalty":
        "default": 0
        "description": "Presence penalty for generation"
        "type": "float"
      "temperature":
        "default": 0.5
        "description": "Temperature for generation"
        "type": "float"
      "top_p":
        "default": 1
        "description": "Top p for generation"
        "type": "float"
"info":
  "description": "Execution Layer Swagger 文档"
  "title": "Execution Layer API"
  "version": "1.0"
"paths":
  "/deployments/create":
    "post":
      "description": ""
      "parameters":
        -
          "description": "user id"
          "in": "header"
          "name": "user_id"
          "required": false
          "schema":
            "type": "string"
        -
          "in": "body"
          "name": "body"
          "required": true
          "schema":
            "properties":
              "model_id":
                "description": "Model to deploy"
                "type": "string"
              "name":
                "description": "Name of the deployment, *cannot contain non-alphanumeric characters other than '-' or uppercase letters"
                "require": true
                "type": "string"
              "node_spec":
                "description": "Node spec (A10/A100) to deploy on, default to A10"
                "type": "string"
              "type":
                "description": "Type of deployment (dedicated or shared)"
                "type": "string"
      "responses":
        "200":
          "description": "Deployment created"
        "400":
          "description": "Name, model, and node_spec are required"
      "summary": "Create a new deployment"
      "tags":
        - "deployments"
  "/deployments/generate":
    "post":
      "description": ""
      "parameters":
        -
          "in": "body"
          "name": "body"
          "required": true
          "schema":
            "properties":
              "deployment_id":
                "description": "id of deployment to be accessed and generate token from"
                "type": "string"
              "frequency_penalty":
                "description": "Frequency penalty for generation"
                "type": "float"
              "input":
                "description": "Input to generate token for"
                "type": "string"
              "max_tokens":
                "description": "Max tokens for generation"
                "type": "integer"
              "presence_penalty":
                "description": "Presence penalty for generation"
                "type": "float"
              "temperature":
                "description": "Temperature for generation"
                "type": "float"
              "top_p":
                "description": "Top p for generation"
                "type": "float"
              "user_id":
                "description": "User ID to generate token for"
                "type": "string"
      "responses":
        "200":
          "description": "Token generated"
      "summary": "Generate token from a deployed model"
      "tags":
        - "deployments"
  "/deployments/list":
    "get":
      "description": ""
      "parameters":
        -
          "description": "type of deployment, options dedicated, shared"
          "in": "query"
          "name": "is_dedicated"
          "required": true
          "type": "boolean"
        -
          "description": "user id to filter deployments，necessary when is_dedicated is true"
          "in": "query"
          "name": "user_id"
          "required": false
          "type": "string"
        -
          "description": "page index, start from 1"
          "in": "query"
          "name": "page_index"
          "required": false
          "type": "integer"
        -
          "description": "page size"
          "in": "query"
          "name": "page_size"
          "required": false
          "type": "integer"
      "responses":
        "200":
          "description": "List of dedicated deployments"
      "summary": "List all dedicated deployments"
      "tags":
        - "deployments"
  "/deployments/stop":
    "post":
      "description": ""
      "parameters":
        -
          "description": "ID of the deployment to stop"
          "in": "query"
          "name": "deployment_id"
          "required": true
          "type": "string"
      "responses":
        "200":
          "description": "Deployment stopped"
      "summary": "Stop a deployment"
      "tags":
        - "deployments"
  "/models/create":
    "post":
      "description": ""
      "parameters":
        -
          "description": "Model object"
          "in": "body"
          "name": "model"
          "required": true
          "schema":
            "properties":
              "description":
                "type": "string"
              "license":
                "type": "string"
              "model_size":
                "type": "string"
              "name":
                "type": "string"
              "tags":
                "type": "string"
              "tensor_type":
                "type": "string"
            "type": "object"
      "responses":
        "200":
          "description": "Model created"
        "400":
          "description": "Type, description, model_size, and tensor_type are required"
      "summary": "Create a new public model"
      "tags":
        - "models"
  "/models/generate":
    "post":
      "description": ""
      "parameters":
        -
          "in": "body"
          "name": "body"
          "required": true
          "schema":
            "properties":
              "frequency_penalty":
                "default": 0
                "description": "Frequency penalty for generation"
                "type": "float"
              "input":
                "description": "Text to generate"
                "type": "string"
              "max_tokens":
                "default": 400
                "description": "Max tokens for generation"
                "type": "integer"
              "model_id":
                "description": "Model ID"
                "type": "string"
              "presence_penalty":
                "default": 0
                "description": "Presence penalty for generation"
                "type": "float"
              "temperature":
                "default": 0.5
                "description": "Temperature for generation"
                "type": "float"
              "top_p":
                "default": 1
                "description": "Top p for generation"
                "type": "float"
      "responses":
        "200":
          "description": "Token generated"
        "400":
          "description": "Model ID is required"
      "summary": "Generate token from a shared model"
      "tags":
        - "models"
  "/models/list":
    "get":
      "description": ""
      "parameters":
        -
          "description": "Filter by model type, false for private/custom models"
          "name": "is_public"
          "type": "boolean"
        -
          "description": "Filter by user ID, required if is_public is false"
          "name": "user_id"
          "type": "string"
        -
          "description": "Page index, start from 1"
          "name": "page_index"
          "type": "integer"
        -
          "description": "Number of items per page"
          "name": "page_size"
          "type": "integer"
      "responses":
        "200":
          "description": "List of public/custom models"
      "summary": "List all models"
      "tags":
        - "models"
  "/models/upload":
    "post":
      "description": ""
      "responses":
        "201":
          "description": "Model created from upload"
      "summary": "Create a new model from an uploaded file"
      "tags":
        - "models"
  "/models/usage":
    "get":
      "description": ""
      "responses":
        "200":
          "description": "Model usage data"
      "summary": "Get model usage over a time range"
      "tags":
        - "models"
  "/nodes":
    "get":
      "description": ""
      "responses":
        "200":
          "description": "List of node specs"
      "summary": "List all node specs"
      "tags":
        - "nodes"
    "post":
      "description": ""
      "responses":
        "201":
          "description": "Node created"
        "400":
          "description": "Name is required"
      "summary": "Create a new node spec"
      "tags":
        - "nodes"
  "/nodes/{node_id}":
    "put":
      "description": ""
      "responses":
        "200":
          "description": "Node updated"
        "404":
          "description": "Node not found"
      "summary": "Update a node spec"
      "tags":
        - "nodes"
  "/ping":
    "get":
      "description": ""
      "responses":
        "200":
          "description": "pong"
      "summary": "health check"
      "tags":
        - "system"
  "/tokens":
    "post":
      "description": ""
      "responses":
        "201":
          "description": "Token created"
        "400":
          "description": "User ID is required"
      "summary": "Create a new access token"
      "tags":
        - "tokens"
  "/tokens/user/{user_id}":
    "get":
      "description": ""
      "responses":
        "200":
          "description": "List of access tokens"
      "summary": "List all access tokens of a user"
      "tags":
        - "tokens"
  "/tokens/{token_id}":
    "delete":
      "description": ""
      "responses":
        "200":
          "description": null
      "summary": "Delete an access token"
      "tags":
        - "tokens"
    "get":
      "description": ""
      "responses":
        "200":
          "description": "Token retrieved"
        "404":
          "description": "Token not found"
      "summary": "Retrieve an access token"
      "tags":
        - "tokens"
"swagger": "2.0"