Chat Complete

All models on Tune Studio support chat completion API.

API reference for chat completion can be found here.

Pressing cmd + enter on mac and ctrl + enter on windows inside a text field on chat or text complete in playground would trigger auto complete, Have fun with it.

curl -X POST "https://proxy.tune.app/chat/completions" \
  -H "Authorization: <access key>" \
  -H "Content-Type: application/json" \
  -H 'X-Org-Id: <organization id>' \
  -d '{
    "temperature": 0.9,
    "messages": [
      {
        "role": "system",
        "content": "You are TuneStudio"
      },
      {
        "role": "user",
        "content": "Who are you"
      }
    ],
    "model": "rohan/Meta-Llama-3-8B-Instruct",
    "stream": false,
    "penalty": 0.2,
    "max_tokens": 100
}'

Vision

Some models on Tune Studio support vision completions. You can pass an image URL in the prompt and the model will generate completions based on the image.

curl -X POST "https://proxy.tune.app/chat/completions" \
  -H "Authorization: <access key>" \
  -H "Content-Type: application/json" \
  -H "X-Org-Id: <organization id>" \
  -d '{
        "temperature": 0.9,
        "messages": [
          {
            "role": "user",
            "content": [
              {
                "type": "text",
                "text": "What do you see?"
              },
              {
                "type": "image_url",
                "image_url": {
                  "url": "https://chat.tune.app/icon-512.png"
                }
              }
            ]
          }
        ],
        "model": "rohan/tune-gpt-4o-mini",
        "stream": false,
        "frequency_penalty": 0.2,
        "max_tokens": 200
    }'

To pass an image in base64 format, you can replace the image section in the above API request with the following:

{
  "type": "image_url",
  "image_url": {
    "url": f"data:image/jpeg;base64,{base64_image}"
  }
}

Some Models Ids that support vision completions are, please check studio for the latest models:

  • mistral/pixtral-12B-2409
  • rohan/tune-gpt-4o-mini
  • rohan/tune-gpt-4o

Text Complete

All models deployed on Tune Studio support text complete but not integrated models.

API reference for text completion can be found here.

curl -X POST "https://proxy.tune.app/text/completions" \
-H "Authorization: <access key>" \
-H "Content-Type: application/json" \
-H "X-Org-Id: <organization id>" \
-d '{
  "temperature": 0.5,
  "prompt": "Hello, my name is TuneStudio. What is your name?",
  "model": "rohan/Meta-Llama-3-8B-Instruct",
  "stream": false,
  "max_tokens": 100
}'

Configuration

Configurations take around 4 minutes to reflect in the system.

Chat Format

Completions API can format the prompt in a chat based on the prompt format choosen by the user in setting of a model card and then uses the text complete API to generate a response with the formatted prompt.

Note: Right now this feature is only available for models directly deployed on Tune Studio.

Log API Requests

You can log all the API requests made by the completions API by enabling the log API requests in the settings of the model card and are visible in the API log section of models.