Provision an intern
curl --request POST \
--url https://openrouter.ai/api/v1/interns/{internId}/provision \
--header 'Authorization: Bearer <token>'import requests
url = "https://openrouter.ai/api/v1/interns/{internId}/provision"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://openrouter.ai/api/v1/interns/{internId}/provision', 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/interns/{internId}/provision",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://openrouter.ai/api/v1/interns/{internId}/provision"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/interns/{internId}/provision")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openrouter.ai/api/v1/interns/{internId}/provision")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"provisioning": true
}{
"error": {
"code": 401,
"message": "Invalid or missing API key"
}
}{
"error": {
"code": 403,
"message": "Forbidden"
}
}{
"error": {
"code": "not_found",
"message": "Intern not found"
}
}{
"error": {
"code": 408,
"message": "Request timed out"
}
}{
"error": {
"code": "intern_busy",
"message": "The intern is not in a state that allows this operation"
}
}{
"error": {
"code": "internal_error",
"message": "The request could not be completed"
}
}{
"error": {
"code": "upstream_unavailable",
"message": "The intern service could not be reached, retry the request"
}
}Interns
Provision an intern
Starts the first boot, or resumes an intern after suspension. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as eu.openrouter.ai are refused. API key required.
POST
/
interns
/
{internId}
/
provision
Provision an intern
curl --request POST \
--url https://openrouter.ai/api/v1/interns/{internId}/provision \
--header 'Authorization: Bearer <token>'import requests
url = "https://openrouter.ai/api/v1/interns/{internId}/provision"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://openrouter.ai/api/v1/interns/{internId}/provision', 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/interns/{internId}/provision",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://openrouter.ai/api/v1/interns/{internId}/provision"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/interns/{internId}/provision")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openrouter.ai/api/v1/interns/{internId}/provision")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"provisioning": true
}{
"error": {
"code": 401,
"message": "Invalid or missing API key"
}
}{
"error": {
"code": 403,
"message": "Forbidden"
}
}{
"error": {
"code": "not_found",
"message": "Intern not found"
}
}{
"error": {
"code": 408,
"message": "Request timed out"
}
}{
"error": {
"code": "intern_busy",
"message": "The intern is not in a state that allows this operation"
}
}{
"error": {
"code": "internal_error",
"message": "The request could not be completed"
}
}{
"error": {
"code": "upstream_unavailable",
"message": "The intern service could not be reached, retry the request"
}
}Authorizations
API key as bearer token in Authorization header
Path Parameters
ID of an intern visible to the authenticated API key.
Minimum string length:
1Example:
"7c9e6679-7425-40de-944b-e07fc1f90ae7"
Response
The operation was accepted.