curl --request POST \
--url https://openrouter.ai/api/v1/vault/interns/{internId}/secrets/copy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"names": [
"github_token"
]
}
'import requests
url = "https://openrouter.ai/api/v1/vault/interns/{internId}/secrets/copy"
payload = { "names": ["github_token"] }
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({names: ['github_token']})
};
fetch('https://openrouter.ai/api/v1/vault/interns/{internId}/secrets/copy', 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://openrouter.ai/api/v1/vault/interns/{internId}/secrets/copy",
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([
'names' => [
'github_token'
]
]),
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://openrouter.ai/api/v1/vault/interns/{internId}/secrets/copy"
payload := strings.NewReader("{\n \"names\": [\n \"github_token\"\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://openrouter.ai/api/v1/vault/interns/{internId}/secrets/copy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"names\": [\n \"github_token\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openrouter.ai/api/v1/vault/interns/{internId}/secrets/copy")
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 \"names\": [\n \"github_token\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"created_at": "2026-09-15T17:44:00.000Z",
"fingerprint": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"hosts": [
"api.github.com"
],
"name": "github_token"
}
]
}Copy workspace secrets to an intern
Copies the named workspace secrets into one intern’s scope, replacing any intern secret with the same name. Each copy keeps the source value and host bindings. Every name must exist in the workspace scope or the request fails with 404 and nothing is copied. A workspace secret whose hosts is null cannot be copied: the request fails with 409 and nothing is copied until that secret is stored again with hosts. The response carries metadata only. Writes return 503 while vault writes are disabled for the caller. The scope is selected by the API key: workspace routes act on the key’s active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. Requests on regional hostnames such as eu.openrouter.ai are refused. API key required.
curl --request POST \
--url https://openrouter.ai/api/v1/vault/interns/{internId}/secrets/copy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"names": [
"github_token"
]
}
'import requests
url = "https://openrouter.ai/api/v1/vault/interns/{internId}/secrets/copy"
payload = { "names": ["github_token"] }
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({names: ['github_token']})
};
fetch('https://openrouter.ai/api/v1/vault/interns/{internId}/secrets/copy', 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://openrouter.ai/api/v1/vault/interns/{internId}/secrets/copy",
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([
'names' => [
'github_token'
]
]),
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://openrouter.ai/api/v1/vault/interns/{internId}/secrets/copy"
payload := strings.NewReader("{\n \"names\": [\n \"github_token\"\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://openrouter.ai/api/v1/vault/interns/{internId}/secrets/copy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"names\": [\n \"github_token\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openrouter.ai/api/v1/vault/interns/{internId}/secrets/copy")
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 \"names\": [\n \"github_token\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"created_at": "2026-09-15T17:44:00.000Z",
"fingerprint": "sha256:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"hosts": [
"api.github.com"
],
"name": "github_token"
}
]
}Authorizations
API key as bearer token in Authorization header
Path Parameters
UUID of an intern in the workspace selected by the API key.
"7c9e6679-7425-40de-944b-e07fc1f90ae7"
Body
Workspace secrets to copy into the intern scope.
Names of workspace secrets to copy, 1 to 100 unique entries. Every name must exist in the workspace scope.
1 - 100 elements1 - 255^(?!.*__)[a-z]([a-z0-9_]*[a-z0-9])?$Response
Metadata for the copied secrets.
Metadata for the copies now stored in the intern scope, one entry per requested name.
100Show child attributes
Show child attributes