Skip to main content

Assistant API Usage

This page explains how to integrate with the SkyStudio Assistant API.

1) Where to Get the API Key

In the SkyStudio interface, you can view the API Key assigned to the relevant Assistant API under Workspace Settings / API Keys.

2) API Settings

  • Method: POST
  • URL: https://skystudio.skymod.tech/api/v2
  • Auth: Bearer Token (YOUR API KEY)
  • Headers: Content-Type: text/plain
  • Body: Raw, JSON

💡 Why Do We Use These Parameters?

  • Method: POST
    We are not only retrieving existing data. We are sending a new question or file to the assistant for processing.

  • Auth: Bearer Token
    This is your access credential. It is the secret security key that proves you are authorized to use the API.

  • Headers: Content-Type: text/plain
    This allows requests to reach the server quickly and reliably without being blocked by browser security filters.

  • Body: Raw, JSON
    The question and settings sent to the assistant are packaged in JSON, a universal format that the system can easily process.

3) Example Requests

Endpoint

MethodPathContent-Type
POST/api/v2text/plain

Full URL: https://skystudio.skymod.tech/api/v2

3.1) Usage Without a File

{
"query": "My email signature is not displayed. How can I fix it?",
"isStream": false,
"citationType": "html"
}

3.2) Usage with a File Uploaded to SkyStudio

Use the name or ID of a file that has already been uploaded to SkyStudio.

{
"query": "What is this file about?",
"file": "IK_dataset_100.csv",
"isStream": false,
"citationType": "html"
}

3.3) Usage with an Image URL

{
"query": "https://example.com/image.png What do you see in this image?",
"isStream": false,
"citationType": "html"
}

4) Troubleshooting

If you receive an error, first check the following:

  • Is the URL correct?
  • Is the Bearer token correct?
  • Is the Content-Type correct?
  • Is the request body format correct?

Then review the error according to its status code: