API → MLGenerate code completions for KCL
beta

Parameters

Name

Type

Req.

Returns

  • 201 Created

    successful creation

    Name

    Type

    Req.

    body

    object
    optional
    Object Properties
post
/ml/kcl/completions
$ curl -X POST "https://api.zoo.dev/ml/kcl/completions" \
	--header "Authorization: Bearer $TOKEN" \
	--header "Content-Type: application/json" \
	--data '{
  "extra": {
    "language": "WmEkryxVbaSmH6inuz2d",
    "next_indent": 6,
    "prompt_tokens": 31,
    "suffix_tokens": 9,
    "trim_by_indentation": false
  },
  "max_tokens": 32,
  "n": 31,
  "nwo": "4GzMaB",
  "prompt": "FU94aWQUAN41fo",
  "stop": [
    "e6R0Z3HKLdkrg3srac1DlbWew"
  ],
  "stream": true,
  "suffix": "mjXBdbLf",
  "temperature": 2,
  "top_p": 27
}'
201 Created
Response
{
  "completions": [
    "0sfFLu8xeISq3o7w504muzj8"
  ]
}