API reference
AI models
Each step of the content pipeline (outlines, drafting, keyword analysis, images and more) runs on a configurable AI model. Any token can read the configuration; only admin tokens can change it, and changes apply platform-wide.
2 endpointsBase URL https://autoranko.com/api/public/v1Every request needs a bearer token
List AI models
https://autoranko.com/api/public/v1/ai/modelsShows which AI model each step of the content pipeline uses. Each entry in tasks has the model in effect (model) and its built-in default (default); kind says whether the task runs a text model (chat) or an image model (image). chat_models and image_models list the models a task can be switched to.
The configuration is platform-wide and read-only for regular accounts. It's useful for showing which model wrote your content.
Request
No parameters. Send the request with your token, nothing else.
curl https://autoranko.com/api/public/v1/ai/models \
-H "Authorization: Bearer $AUTORANKO_TOKEN"const res = await fetch("https://autoranko.com/api/public/v1/ai/models", {
headers: { Authorization: `Bearer ${process.env.AUTORANKO_TOKEN}` },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
for (const task of data.tasks) {
const note = task.model === task.default ? "" : `(default: ${task.default})`;
console.log(task.id.padEnd(14), task.model, note);
}import os
import requests
res = requests.get(
"https://autoranko.com/api/public/v1/ai/models",
headers={"Authorization": f"Bearer {os.environ['AUTORANKO_TOKEN']}"},
timeout=30,
)
data = res.json()
if not res.ok:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
for task in data["tasks"]:
note = "" if task["model"] == task["default"] else f"(default: {task['default']})"
print(f"{task['id']:<14} {task['model']} {note}")<?php
$ch = curl_init('https://autoranko.com/api/public/v1/ai/models');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('AUTORANKO_TOKEN')],
]);
$data = json_decode(curl_exec($ch), true);
if (isset($data['error'])) throw new RuntimeException($data['error']['message']);
foreach ($data['tasks'] as $task) {
$note = $task['model'] === $task['default'] ? '' : " (default: {$task['default']})";
printf("%-14s %s%s\n", $task['id'], $task['model'], $note);
}Response
200OKThe pipeline tasks with their models, and the model catalog.
application/jsontasksarray of objectsPipeline tasks and the model each one uses.tasksitems(6)AiTaskidstringTask ID. This is what PUT /ai/models takes astask.One of
draftoutlinekeywordssite_analysispersonascontent_planenrichmentrewritelinkingseo_metaimagelabelstringHuman-readable name.kindstringchattasks run a model fromchat_models; theimagetask runs one fromimage_models.One of
chatimagedescriptionstringWhat the task does in the pipeline.modelstringThe model the task currently uses.defaultstringThe task's built-in default model.
chat_modelsarray of objectsModels available tochattasks.chat_modelsitems(2)AiModelidstringModel ID. Pass it asmodelto PUT /ai/models.labelstringHuman-readable name and positioning.
image_modelsarray of objectsModels available to theimagetask.image_modelsitems(2)AiModelidstringModel ID. Pass it asmodelto PUT /ai/models.labelstringHuman-readable name and positioning.
Example
Current configuration
GET/ai/models
{
"tasks": [
{
"id": "draft",
"label": "Article drafting",
"kind": "chat",
"description": "Writes the full article HTML from the outline",
"model": "gpt-6-astra",
"default": "claude-opus-5-5"
},
{
"id": "outline",
"label": "Article outlines",
"kind": "chat",
"description": "Title, meta, sections, FAQs, image plan",
"model": "gpt-6-luna",
"default": "claude-sonnet-5-5"
},
{
"id": "keywords",
"label": "Keyword analysis",
"kind": "chat",
"description": "Keyword ideas, volume/difficulty estimates",
"model": "gpt-6-luna",
"default": "claude-haiku-5-5"
},
{
"id": "site_analysis",
"label": "Site analysis",
"kind": "chat",
"description": "Business profile & language detection at onboarding",
"model": "gpt-6-luna",
"default": "gpt-6-luna"
},
{
"id": "personas",
"label": "Buyer personas",
"kind": "chat",
"description": "Audience personas that steer tone & examples",
"model": "gpt-6-luna",
"default": "claude-sonnet-5-5"
},
{
"id": "content_plan",
"label": "Content planning",
"kind": "chat",
"description": "30-day topic calendar generation",
"model": "gpt-6-luna",
"default": "claude-sonnet-5-5"
},
{
"id": "enrichment",
"label": "Content enrichment",
"kind": "chat",
"description": "Improvement suggestions for existing posts",
"model": "gpt-6-luna",
"default": "claude-sonnet-5-5"
},
{
"id": "rewrite",
"label": "Full rewrites",
"kind": "chat",
"description": "Rewrites underperforming articles",
"model": "gpt-6-astra",
"default": "claude-opus-5-5"
},
{
"id": "linking",
"label": "Internal linking",
"kind": "chat",
"description": "Anchor placement across existing content",
"model": "gpt-6-luna",
"default": "claude-haiku-5-5"
},
{
"id": "seo_meta",
"label": "SEO metadata",
"kind": "chat",
"description": "Meta descriptions, focus keywords, categorization, E-E-A-T",
"model": "gpt-6-luna",
"default": "claude-haiku-5-5"
},
{
"id": "image",
"label": "Image generation",
"kind": "image",
"description": "Hero & in-article images",
"model": "nano-banana-2",
"default": "nano-banana-2"
}
],
"chat_models": [
{
"id": "claude-opus-5-5",
"label": "Claude Opus 5.5 — highest quality"
},
{
"id": "claude-fable-5",
"label": "Claude Fable 5"
},
{
"id": "claude-sonnet-5-5",
"label": "Claude Sonnet 5.5 — balanced"
},
{
"id": "claude-haiku-5-5",
"label": "Claude Haiku 5.5 — fast & cheap"
},
{
"id": "claude-sonnet-5",
"label": "Claude Sonnet 5"
},
{
"id": "gpt-6-astra",
"label": "GPT-6 Astra — most capable GPT"
},
{
"id": "gpt-6-luna",
"label": "GPT-6 Luna"
},
{
"id": "gpt-6-sol",
"label": "GPT-6 Sol"
},
{
"id": "gpt-5.6-luna",
"label": "GPT-5.6 Luna"
}
],
"image_models": [
{
"id": "nano-banana-2",
"label": "Nano Banana 2 — 2K, best default"
},
{
"id": "gpt-image-2",
"label": "GPT Image 2"
},
{
"id": "seedream-3",
"label": "Seedream 3.0"
},
{
"id": "z-image",
"label": "Z-Image — fastest"
}
]
}Errors
| Error | When |
|---|---|
| 401missing_token | The Authorization: Bearer … header is missing. |
| 401invalid_token | The token is malformed, unknown or revoked. |
| 429rate_limited | The token made more than 120 requests in the last 60 seconds. |
Set a task's AI model
https://autoranko.com/api/public/v1/ai/modelsAdmin tokenChanges the AI model one pipeline task uses. Admin only: the token must belong to an Autoranko administrator account, and tokens from regular accounts get 403 forbidden. The setting is platform-wide and takes effect from the next AI call, for every site.
The model must fit the task's kind: pick from chat_models for chat tasks and from image_models for the image task (see GET /ai/models).
Request
application/jsontaskstringRequiredThe pipeline task to change: anidfromtasksin GET /ai/models.One of
draftoutlinekeywordssite_analysispersonascontent_planenrichmentrewritelinkingseo_metaimage- Example
outline
modelstringRequiredThe model to use: anidfromchat_modelsfor chat tasks, or fromimage_modelsfor theimagetask.- Example
claude-sonnet-5-5
curl -X PUT https://autoranko.com/api/public/v1/ai/models \
-H "Authorization: Bearer $AUTORANKO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"task": "outline",
"model": "claude-sonnet-5-5"
}'const res = await fetch("https://autoranko.com/api/public/v1/ai/models", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.AUTORANKO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
task: "outline",
model: "claude-sonnet-5-5",
}),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
console.log(`${data.task} now uses ${data.model}`);import os
import requests
res = requests.put(
"https://autoranko.com/api/public/v1/ai/models",
headers={"Authorization": f"Bearer {os.environ['AUTORANKO_TOKEN']}"},
json={
"task": "outline",
"model": "claude-sonnet-5-5",
},
timeout=30,
)
data = res.json()
if not res.ok:
raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(f"{data['task']} now uses {data['model']}")<?php
$ch = curl_init('https://autoranko.com/api/public/v1/ai/models');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('AUTORANKO_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'task' => 'outline',
'model' => 'claude-sonnet-5-5',
]),
]);
$data = json_decode(curl_exec($ch), true);
if (isset($data['error'])) throw new RuntimeException($data['error']['message']);
echo "{$data['task']} now uses {$data['model']}\n";Response
200OKThe model was saved.
application/jsonokbooleanAlwaystrue.taskstringThe task that changed.One of
draftoutlinekeywordssite_analysispersonascontent_planenrichmentrewritelinkingseo_metaimagemodelstringThe model it now uses.
Examples
PUT/ai/models
{
"task": "outline",
"model": "claude-sonnet-5-5"
}{
"ok": true,
"task": "outline",
"model": "claude-sonnet-5-5"
}PUT/ai/models
{
"task": "outline",
"model": "claude-sonnet-5-5"
}{
"error": {
"code": "forbidden",
"message": "Only admin tokens can change platform AI models."
}
}PUT/ai/models
{
"task": "image",
"model": "claude-sonnet-5-5"
}{
"error": {
"code": "invalid_body",
"message": "Unknown model for this task kind."
}
}Errors
| Error | When |
|---|---|
| 400invalid_body | The body isn't valid JSON (Invalid JSON body.). |
| 400invalid_body | task isn't one of the task IDs (Unknown task.). |
| 400invalid_body | model isn't available for the task's kind (Unknown model for this task kind.). |
| 401missing_token | The Authorization: Bearer … header is missing. |
| 401invalid_token | The token is malformed, unknown or revoked. |
| 403forbidden | The token doesn't belong to an administrator account. |
| 429rate_limited | The token made more than 120 requests in the last 60 seconds. |
API version v1. Every path on this page is relative to https://autoranko.com/api/public/v1.