Make a key the default
Make the scope's key for provider its default key: the key scanners and scouts with no provider run on. The scope's previous default stops being the default. Also the MCP tool make_default_replay_vision_key. 400 invalid_key for a bad provider, location or extra field, 403 location_not_linked when the client is not one of the agency's, 404 not_found when the scope has no key for that provider.
curl -X POST "https://mythic-analytics.gulp.workers.dev/client/v1/replay-vision/keys/default" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"location_id": "example_string",
"provider": "openrouter"
}'
import requests
import json
url = "https://mythic-analytics.gulp.workers.dev/client/v1/replay-vision/keys/default"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"location_id": "example_string",
"provider": "openrouter"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://mythic-analytics.gulp.workers.dev/client/v1/replay-vision/keys/default", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"location_id": "example_string",
"provider": "openrouter"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"location_id": "example_string",
"provider": "openrouter"
}`)
req, err := http.NewRequest("POST", "https://mythic-analytics.gulp.workers.dev/client/v1/replay-vision/keys/default", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://mythic-analytics.gulp.workers.dev/client/v1/replay-vision/keys/default')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"location_id": "example_string",
"provider": "openrouter"
}'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"scope": "agency",
"location_id": "example_string",
"provider": "openrouter",
"key_hint": "…a1b2",
"default_model": "example_string",
"is_default": true,
"verified_at": "2024-12-25T10:00:00Z",
"last_error": "example_string",
"last_error_at": "2024-12-25T10:00:00Z",
"updated_at": "2024-12-25T10:00:00Z"
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
/client/v1/replay-vision/keys/default
Target server for requests. Edit to use your own host.
Agency key (ak_) only; a location secret key (sk_) gets 403 agency_required. Agency-wide scoped keys (mcp_) need replay_vision:read or replay_vision:write.
ak_) only; a location secret key (sk_) gets 403 agency_required. Agency-wide scoped keys (mcp_) need replay_vision:read or replay_vision:write.The media type of the request body
A client id. Omit or null for the agency's keys.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Agency key (ak_) only; a location secret key (sk_) gets 403 agency_required. Agency-wide scoped keys (mcp_) need replay_vision:read or replay_vision:write.
Body
A client id. Omit or null for the agency's keys.
openroutergeminicloudflare