Upload a skill
curl --request POST \
--url https://api.lava.so/v1/skills/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"skill_name": "my-skill",
"files": [
{
"path": "SKILL.md",
"content": "<string>"
}
]
}
'import requests
url = "https://api.lava.so/v1/skills/upload"
payload = {
"skill_name": "my-skill",
"files": [
{
"path": "SKILL.md",
"content": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({skill_name: 'my-skill', files: [{path: 'SKILL.md', content: '<string>'}]})
};
fetch('https://api.lava.so/v1/skills/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lava.so/v1/skills/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'skill_name' => 'my-skill',
'files' => [
[
'path' => 'SKILL.md',
'content' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lava.so/v1/skills/upload"
payload := strings.NewReader("{\n \"skill_name\": \"my-skill\",\n \"files\": [\n {\n \"path\": \"SKILL.md\",\n \"content\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lava.so/v1/skills/upload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"skill_name\": \"my-skill\",\n \"files\": [\n {\n \"path\": \"SKILL.md\",\n \"content\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lava.so/v1/skills/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"skill_name\": \"my-skill\",\n \"files\": [\n {\n \"path\": \"SKILL.md\",\n \"content\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"skill_name": "my-skill",
"file_count": 3,
"message": "Skill \"my-skill\" uploaded successfully (3 files)."
}{
"error": {
"message": "Invalid authentication credentials",
"code": "forward_token_json_invalid",
"status": 400,
"issues": [
{
"path": [
"model"
],
"message": "Missing required field: model"
},
{
"path": [
"messages",
"0",
"content"
],
"message": "Invalid message content format"
}
]
}
}{
"error": {
"message": "Invalid authentication credentials",
"code": "forward_token_json_invalid",
"status": 400,
"issues": [
{
"path": [
"model"
],
"message": "Missing required field: model"
},
{
"path": [
"messages",
"0",
"content"
],
"message": "Invalid message content format"
}
]
}
}Skills
Upload a skill
Upload a skill as a set of files. Each file must be a supported type (md, txt, py, ts, js, json, yaml, yml, sh, toml, xml). Individual files are limited to 50KB and the total upload to 500KB. At most 20 files per upload.
POST
/
skills
/
upload
Upload a skill
curl --request POST \
--url https://api.lava.so/v1/skills/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"skill_name": "my-skill",
"files": [
{
"path": "SKILL.md",
"content": "<string>"
}
]
}
'import requests
url = "https://api.lava.so/v1/skills/upload"
payload = {
"skill_name": "my-skill",
"files": [
{
"path": "SKILL.md",
"content": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({skill_name: 'my-skill', files: [{path: 'SKILL.md', content: '<string>'}]})
};
fetch('https://api.lava.so/v1/skills/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lava.so/v1/skills/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'skill_name' => 'my-skill',
'files' => [
[
'path' => 'SKILL.md',
'content' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lava.so/v1/skills/upload"
payload := strings.NewReader("{\n \"skill_name\": \"my-skill\",\n \"files\": [\n {\n \"path\": \"SKILL.md\",\n \"content\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lava.so/v1/skills/upload")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"skill_name\": \"my-skill\",\n \"files\": [\n {\n \"path\": \"SKILL.md\",\n \"content\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lava.so/v1/skills/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"skill_name\": \"my-skill\",\n \"files\": [\n {\n \"path\": \"SKILL.md\",\n \"content\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"skill_name": "my-skill",
"file_count": 3,
"message": "Skill \"my-skill\" uploaded successfully (3 files)."
}{
"error": {
"message": "Invalid authentication credentials",
"code": "forward_token_json_invalid",
"status": 400,
"issues": [
{
"path": [
"model"
],
"message": "Missing required field: model"
},
{
"path": [
"messages",
"0",
"content"
],
"message": "Invalid message content format"
}
]
}
}{
"error": {
"message": "Invalid authentication credentials",
"code": "forward_token_json_invalid",
"status": 400,
"issues": [
{
"path": [
"model"
],
"message": "Missing required field: model"
},
{
"path": [
"messages",
"0",
"content"
],
"message": "Invalid message content format"
}
]
}
}Authorizations
Bearer token authentication used for standard API calls. Format: 'Bearer YOUR_API_KEY'
Body
application/json
⌘I