Deka GPU Documentations
  • Starter Guide
    • Introduction
    • Sign Up
    • Choose a Package
    • Top Up
    • Create a Virtual Machine
    • Download kubeconfig
    • Create a Deka LLM
    • Create a Deka Notebook
    • Conclusion
  • Service Portal
    • Introduction
    • Sign Up
    • Sign In
    • Sign Out
    • Forgot Password
    • Account Setting
      • Using MFA Google Authenticator
      • Using MFA Microsoft Authenticator
    • Project
      • Add Project
      • Delete Project
    • List Roles
    • Broadcast
    • Audit Log
    • Voucher
    • Security
      • AI Security AI Infrastructure Layer
      • AI Security AI Application Layer
    • Ticket
      • Create Ticket
      • Detail Ticket
    • Billing
      • Daily Cost Estimated
      • Monthly Cost
      • Invoice
      • Summary Monthly
    • Balance
      • Project Type: SME
        • GPU Merdeka
        • Choose Package
        • Top-Up
      • Project Type: Enterprise
      • History Balance
        • Balance
        • Transaction
      • Custom Resource Definition
  • Deka GPU
    • Deka GPU: Kubernetes
      • Introduction
      • GPU Type
      • Dashboard
        • Check Status Kubernetes
        • Download Kube Config
        • Access Console
      • Workloads
        • Pods
          • Create New Pod
          • Access Console
          • Configuration Pod
          • Delete Pod
          • How to Create a New Pod use CLI
        • Deployments
          • Create New Deployment
          • Configuring Deployment
          • Delete of a Deployment
          • How to Create a New Deployment use CLI
        • DaemonSets
          • Create a New DaemonSet
          • Configuring a DaemonSet
          • Delete DaemonSet
      • Services
      • Storages
        • Storage Class
        • Persistent Volume Claims
          • Create a New Persistent Volume Claim
          • How to Create a New Persistent Volume Claim use CLI
    • Deka GPU: VMs
      • Operating System
      • GPU Type
      • Machine Type
      • Namespace Type
      • Storage Class
      • How to Create a Virtual Machine on Service Portal
      • How to Manually Create a Virtual Machine
        • Download Kube Config
        • Running Kube Config
        • Configuration file dv.yaml
        • Configuration file vm.yaml
        • Configuration file svc.yaml
      • Feature Overview of Virtual Machine
        • Detail a Virtual Machine
        • Open Console
        • Turn Off a VM Instance
        • Turn On a VM Instance
        • Restart a Virtual Machine
        • How to Access Console
        • Show YAML File
      • Delete a Virtual Machine
    • Deka GPU: Registry
      • Create Registry
      • Quota
      • Detail Registry
        • Summary
        • Repository
        • Logs
        • Labels
        • Tag Immutability
        • Member
        • Resize Storage Registry
      • Delete Registry
    • Deka GPU: Security
      • Deka Guard
        • Introduction
        • Create Guard to Deny All Ingress
        • Create Guard to Allow Ingress
        • Create Guard to Allow Ingress with port
        • Create Guard to Allow Ingress with IP/CIDR
        • Create Guard to Deny All Egress
        • Create Guard to Allow Egress
        • Create guard to Allow Egress with Port
        • Create Guard to Allow Egress with IP/CIDR
    • Deka GPU: Service
      • Ingress
        • Install Ingress nginx
        • Install Cert Manager
        • Create Cluster Issuer
        • Create Ingress with TLS
    • Deka GPU: Autoscaling
      • Basic Autoscaling
    • Deka GPU: Network
      • Deka VPC
    • Deka GPU: MLOps
      • Introduction
      • Notebook
      • Tensorboards
      • Volumes
      • Endpoints
        • Create Endpoint
        • Delete Endpoint
      • Experiments (AutoML)
        • Create Experiments (AutoML)
        • Create Experiments (AutoML) using Python SDK
        • Get Experiments Results
      • Experiments (KFP)
        • Create Experiment
      • Pipelines
      • Runs
        • Create Run
        • Delete Active Run
      • Recurring Runs
        • Create Recurring Run
        • Delete Recurring Runs
        • Home
      • Artifacts
      • Executions
      • Manage Contributors
  • Deka LLM
    • Introduction
    • Check Project Type
    • Create a New LLM
    • Detail Deka LLM
      • Overview Tab
      • Keys Tab
        • Create a New Key
        • Detail a Key
        • Edit a Key
        • Get a Secret Key
        • Delete a Key
      • Usage Tab
      • Top Up Coin
    • API Deka LLM
      • Model Management
      • Completions
      • Embedding
    • Delete Deka LLM
    • How to Create Simple Prompt with Deka LLM
      • Create Deka LLM
      • Get URL API Deka LLM
      • Get Secret Key
      • Access API Deka LLM using Postman
      • Get Model
      • Post Chat Completions
  • Deka Notebook
    • Introduction
    • Namespace Type
    • Create a New Notebook
    • Detail Deka Notebook
      • Configuration Deka Notebook
      • Start Deka Notebook Service
      • Stop Deka Notebook Service
      • Get Token
      • Login Deka Notebook
      • Logout Deka Notebook
    • Delete Deka Notebook
  • Reference
    • How to use kubeconfig on Linux
    • How to use kubeconfig on Windows
    • Kubernetes Commands for Enhancing Security
    • How to add GPU in Kubernetes
    • How to Add GPU in VM
      • Download kubeconfig
      • Install kubectl
      • Add GPU
      • Install Driver NVIDIA
    • RAPIDS
      • How to Setup RAPIDS
      • How to make Custom Image
    • How to push image with Docker
    • Deployment LLaMA 3.1 70B with VLLM on Kubernetes
      • Getting the Hugging Face API Key
      • Requesting Access to the LLaMA Model
      • Connect Kubernetes on Computer
      • Create Namespace
      • Create PersistentVolumeClaim (PVC)
      • Create Secret for Hugging Face Token
      • Create Deployment
      • Create Service
      • Verify Deployment
      • Accessing the LLaMA Service
      • Troubleshooting
    • How to Get an API Key on NGC
    • Deployment LLM with Deka GPU + NIM
    • Deployment Deepseek R1 70B with VLLM on Deka GPU's Kubernetes
      • Prerequisites
      • Create Namespace
      • Create PersistentVolumeClaim (PVC)
      • Create Deployment
      • Create Service
      • Verify Deployment
      • Accessing the Deepsek Service
      • Troubleshooting
    • How to Upload and Download on FTP Web
  • Troubleshooting
    • Reinstall Driver NVIDIA on Linux
    • NVIDIA Driver Not Detected After Upgrade Kernel
Powered by GitBook
On this page
  • Example Request
  • Response
  1. Deka LLM
  2. API Deka LLM

Completions

Completion in a Large Language Model (LLM) refers to the process of generating text based on the input provided by the user. The LLM receives a prompt (input) and then produces a response that continues or completes the text according to patterns learned from its training data.

https://dekallm.cloudeka.ai/v1/chat/completions

Example Request

curl --request POST \
  --url https://dekallm.cloudeka.ai/v1/chat/completions \
  --header 'Authorization: Bearer API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "meta/llama-3.1-405b-instruct",
  "messages": [
    {
      "role": "system",
      "content": "You are a story teller"
    },
		 {
      "role": "user",
      "content": "Write poem that tell story about Lord of the Rings start from when Frodo leaves his villages. Story should also tell the audience that Frodo is not always good boy, while Sauron also not always a bad boy. Poem should have 10 paragraf and have rythmns like a folks song"
    }
  ],
  "stream": false,
  "temperature": 0.9,
  "top_p": 1,
}'
import requests
import json

url = "https://dekallm.cloudeka.ai/v1/chat/completions"

headers = {
    "Authorization": "Bearer API_KEY",  
    "Content-Type": "application/json"
}

data = {
    "model": "meta/llama-3.1-405b-instruct",
    "messages": [
        {
            "role": "system",
            "content": "You are a story teller"
        },
        {
            "role": "user",
            "content": "Write a poem that tells a story about Lord of the Rings starting from when Frodo leaves his village. The story should also tell the audience that Frodo is not always a good boy, while Sauron is also not always a bad boy. The poem should have 10 paragraphs and have rhythms like a folk song."
        }
    ],
    "stream": False,
    "temperature": 0.9,
    "top_p": 1,
}

response = requests.post(url, headers=headers, data=json.dumps(data))

print(response.status_code)  
print(response.json())  

Response

{
	"id": "chat-96467625014545a2976178313633ce68",
	"choices": [
		{
			"finish_reason": "stop",
			"index": 0,
			"message": {
				"content": "In the Shire's heart, where the sun always shines\nLived Frodo, a young hobbit, with a fate divine\nHe inherited the Ring, a treasure so grand\nFrom Bilbo, his uncle, who'd traveled the land\n\nHe set out on a journey, from his village so fair\nLeaving friends and family, with tears in the air\nHe knew not the dangers, that lay ahead in store\nBut he felt the weight, of the Ring's power once more\n\nBut little do we know, about Frodo's past\nHe wasn't always good, he had a reckless cast\nHe'd steal from the market, and play pranks on his friends\nAnd cause trouble in the Shire, till the very end\n\nHe'd dance with the ladies, under the stars so bright\nAnd sing with the travelers, through the night so light\nBut amidst the fun, and the laughter so free\nHe'd hide a secret, that only he could see\n\nNow Sauron, the Dark Lord, wasn't always so bold\nHe was once a Maiar, with a heart of gold\nHe was seduced by power, and corrupted by pride\nAnd now his darkness, spreads far and wide\n\nHe forged the One Ring, with fire and with might\nTo control and enslave, all of Middle Earth's light\nBut a part of him, still remembers the past\nWhen love and kindness, were the virtues that would last\n\nAs Frodo traveled on, through mountains and night\nHe met Strider, a Ranger, with a will so bright\nTogether they journeyed, through treacherous terrain\nWith orcs and Uruk-hai, and the Nazgûl's deadly refrain\n\nThe Fellowship formed, with elves, dwarves, and men\nTogether they vowed, to destroy the Ring's evil then\nBut Frodo's own demons, and Sauron's darkest might\nWould test their resolve, through the dark of the night\n\nThe journey was long, through Mordor's burning land\nWith Gollum's conflicted heart, and the Ring's tempting hand\nFrodo and Samwise, a loyal friend so true\nWalked the thin line, between good and evil anew\n\nIn the end, it was Frodo, who stood tall and strong\nWho resisted the Ring's will, and didn't do wrong\nAnd Sauron, the Dark Lord, was defeated that day\nBut a part of him wept, for the love that went astray.",
				"role": "assistant",
				"tool_calls": null,
				"function_call": null
			}
		}
	],
	"created": 1727479222,
	"model": "meta/llama-3.1-405b-instruct",
	"object": "chat.completion",
	"system_fingerprint": null,
	"usage": {
		"completion_tokens": 519,
		"prompt_tokens": 86,
		"total_tokens": 605,
		"completion_tokens_details": null
	},
	"service_tier": null
}
PreviousModel ManagementNextEmbedding

Last updated 2 months ago

Page cover image