Editorial generations
One run of the desk’s pipeline for one slot, with its steps, the AI executions behind them, a verdict and a cost. A run never overwrites a field a person edited, and publishes nothing its verdict did not pass.
List editorial generations
One run of the desk's pipeline. For an article: the text the writer produced, the checks and the review it went through, the translations and the cover that followed, where it was applied, and what it cost. For topics: the batch the strategist proposed and what of it was new. Runs are started by the desk — when a slot comes within its writing time, or the backlog falls under its floor — or by a person with Create; they run in the background, so read the run until state is final. There is no Update and no Delete: history is not edited, and a new run on a drafted slot is how an article is regenerated — by parts, and never over a field a person edited. :cancel stops a live run, :retry resumes a failed one at the step that failed.
path Parameters
website_idId of the parent website.
query Parameters
page_sizeRows per page. Over the maximum is clamped, not rejected.
page_tokenOpaque token from a previous next_page_token. A token minted under a different order_by/filter is rejected.
skipRows to skip before the page (AIP-158). skip + page_size is capped at 10000; beyond that is OUT_OF_RANGE.
order_byComma-separated field [asc|desc], at most 3 keys. Default: create_time desc. Sortable: create_time.
filterAIP-160 subset (§8). Filterable: create_time, end_time, kind, pipeline_version, slot_id, state, trigger. A field outside the list is INVALID_ARGUMENT.
List editorial generations › Responses
One page of editorial_generations.
This page of editorial_generations, in the requested order.
next_page_tokenOpaque. Absent or empty means this was the last page.
total_sizeRows in the whole filtered collection, not in this page.
Create editorial generation
Starts a run now, instead of waiting for the desk to reach it. For an article send kind: ARTICLE and the slot_id; the slot's content mode must be AI_GENERATED and the policy must be ready (a writer that meets its contract). The slot moves to GENERATING and stays there while the text, the translations and the cover are produced; it is DRAFTED when the run is over. parts narrows what is produced — TEXT, TRANSLATIONS, IMAGE — and a run with explicit parts produces them whatever the text's verdict, where a run without produces the translations and the cover only for an article the checks passed. For topics send kind: TOPICS and, optionally, topic_count; the policy must name a topic agent, and one TOPICS run is live per website at a time. The run answers QUEUED: the work happens in the background, so read the run until state is final.
One live run per slot: a second Create answers ALREADY_EXISTS with the run in progress. A slot whose post is live is refused — live content is changed by a person, never regenerated. Send a request_id to make the call safe to repeat: a repeat returns the first run. Runs a person starts do not count against the policy's daily limit.
path Parameters
website_idId of the parent website.
Create editorial generation › Request Body
kindWhat the run produces: ARTICLE — one slot's post, with its translations and cover where the policy names the agents; TOPICS — a batch of proposed topics for the backlog. Fixed after create.
slot_idThe editorial_slots entry the run writes for. Required for an ARTICLE run and refused for a TOPICS run; the slot's content mode must be AI_GENERATED. Fixed after create.
partsWhich parts an ARTICLE run produces: TEXT, TRANSLATIONS, IMAGE. Empty — every part the policy enables, and the translations and the cover only for an article whose text verdict is PASSED. Named explicitly, the parts are produced whatever the verdict. On a drafted slot this is regeneration: the fields a person edited are kept and named on the step, and TEXT may be left out once a run has written the slot's article. Fixed after create.
view_idsThe views a TRANSLATIONS part covers, each one a view the policy would translate into; empty — all of them. Fixed after create.
topic_countHow many topics a TOPICS run asks for, between 1 and 30; defaults to the policy's topic_batch_size. Fixed after create.
image_model_idThe ai_models entry the cover is drawn on for this run, in place of the image agent's preferred_model_id. Only on an ARTICLE run that draws the cover — parts naming IMAGE, or empty on a policy with both image agents; the model must be one the image agent can run on, and is refused with the reason otherwise. Kept by :retry. Fixed after create.
image_notesA person's instructions for the cover of this run, at most 2000 characters. The image brief writer receives them as its notes variable, where its instruction declares one, and the image agent receives them appended to its prompt as they are. Only on a run that draws the cover, like image_model_id. Kept by :retry. Fixed after create.
request_idAn idempotency key you choose, at most 64 characters. Creating with a key already used returns the run that key created instead of starting another.
Create editorial generation › Responses
The created resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
kindWhat the run produces: ARTICLE — one slot's post, with its translations and cover where the policy names the agents; TOPICS — a batch of proposed topics for the backlog. Fixed after create.
slot_idThe editorial_slots entry the run writes for. Required for an ARTICLE run and refused for a TOPICS run; the slot's content mode must be AI_GENERATED. Fixed after create.
partsWhich parts an ARTICLE run produces: TEXT, TRANSLATIONS, IMAGE. Empty — every part the policy enables, and the translations and the cover only for an article whose text verdict is PASSED. Named explicitly, the parts are produced whatever the verdict. On a drafted slot this is regeneration: the fields a person edited are kept and named on the step, and TEXT may be left out once a run has written the slot's article. Fixed after create.
view_idsThe views a TRANSLATIONS part covers, each one a view the policy would translate into; empty — all of them. Fixed after create.
topic_countHow many topics a TOPICS run asks for, between 1 and 30; defaults to the policy's topic_batch_size. Fixed after create.
image_model_idThe ai_models entry the cover is drawn on for this run, in place of the image agent's preferred_model_id. Only on an ARTICLE run that draws the cover — parts naming IMAGE, or empty on a policy with both image agents; the model must be one the image agent can run on, and is refused with the reason otherwise. Kept by :retry. Fixed after create.
image_notesA person's instructions for the cover of this run, at most 2000 characters. The image brief writer receives them as its notes variable, where its instruction declares one, and the image agent receives them appended to its prompt as they are. Only on a run that draws the cover, like image_model_id. Kept by :retry. Fixed after create.
triggerWho started the run: SCHEDULE — the desk, when the slot came within its writing time or the backlog fell under its floor; MANUAL — a person, through Create. Only SCHEDULE runs count against the policy's daily limit.
pipeline_versionWhich sequence of steps the run follows, fixed when it was created: article-v1 for an article, topics-v1 for topics. A run of a version the platform no longer knows ends FAILED.
stateQUEUED, RUNNING, then SUCCEEDED, FAILED or CANCELLED. The verdict is a separate question: a SUCCEEDED run may say the article needs a person.
stepsEvery step of the pipeline with its state — PENDING, RUNNING, WAITING, SUCCEEDED, FAILED, SKIPPED, CANCELLED — the ai_executions entry behind an agent step, the locale and view_ids of a translation step, why a waiting step waits and until when, its automatic retries, its error, and the skipped_fields a step left to the person who had edited them.
verdictWhat the run's checks, its reviewer and its parts made of the article: result (PASSED or NEEDS_REVIEW), the reviewer's score, and every issue with its code, severity, message, the step it came from and, for a translation, its locale. Present once the checks ran; final when the run is.
articleThe article as the writer produced it and the desk rendered it — the structured document the post's HTML was printed from and the translator received. The run's revision of the text, kept whatever happens to the post.
resultWhere the run was applied. An ARTICLE run: the target_id of the post it wrote, the view_ids it localised, and the media_id of the cover it put in the media library. A TOPICS run: created_topic_ids and duplicates_skipped.
costWhat the run's executions were charged to the AI balance, summed, as Money. Absent while none was charged — a run entirely on the account's own key.
policy_snapshotThe editorial AI policy as it was when the run was created. Editing the policy does not change a run in flight; auto_publish alone is read at the date.
errorWhy a FAILED run stopped, in the same shape as an API error: code, status, message and a PRECONDITION_FAILURE whose type names the reason.
end_timeWhen the run reached a final state (RFC 3339, UTC).
Get editorial generation
One run of the desk's pipeline. For an article: the text the writer produced, the checks and the review it went through, the translations and the cover that followed, where it was applied, and what it cost. For topics: the batch the strategist proposed and what of it was new. Runs are started by the desk — when a slot comes within its writing time, or the backlog falls under its floor — or by a person with Create; they run in the background, so read the run until state is final. There is no Update and no Delete: history is not edited, and a new run on a drafted slot is how an article is regenerated — by parts, and never over a field a person edited. :cancel stops a live run, :retry resumes a failed one at the step that failed.
path Parameters
website_idId of the parent website.
editorial_generation_idId of the parent editorial_generation.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get editorial generation › Responses
The resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
kindWhat the run produces: ARTICLE — one slot's post, with its translations and cover where the policy names the agents; TOPICS — a batch of proposed topics for the backlog. Fixed after create.
slot_idThe editorial_slots entry the run writes for. Required for an ARTICLE run and refused for a TOPICS run; the slot's content mode must be AI_GENERATED. Fixed after create.
partsWhich parts an ARTICLE run produces: TEXT, TRANSLATIONS, IMAGE. Empty — every part the policy enables, and the translations and the cover only for an article whose text verdict is PASSED. Named explicitly, the parts are produced whatever the verdict. On a drafted slot this is regeneration: the fields a person edited are kept and named on the step, and TEXT may be left out once a run has written the slot's article. Fixed after create.
view_idsThe views a TRANSLATIONS part covers, each one a view the policy would translate into; empty — all of them. Fixed after create.
topic_countHow many topics a TOPICS run asks for, between 1 and 30; defaults to the policy's topic_batch_size. Fixed after create.
image_model_idThe ai_models entry the cover is drawn on for this run, in place of the image agent's preferred_model_id. Only on an ARTICLE run that draws the cover — parts naming IMAGE, or empty on a policy with both image agents; the model must be one the image agent can run on, and is refused with the reason otherwise. Kept by :retry. Fixed after create.
image_notesA person's instructions for the cover of this run, at most 2000 characters. The image brief writer receives them as its notes variable, where its instruction declares one, and the image agent receives them appended to its prompt as they are. Only on a run that draws the cover, like image_model_id. Kept by :retry. Fixed after create.
triggerWho started the run: SCHEDULE — the desk, when the slot came within its writing time or the backlog fell under its floor; MANUAL — a person, through Create. Only SCHEDULE runs count against the policy's daily limit.
pipeline_versionWhich sequence of steps the run follows, fixed when it was created: article-v1 for an article, topics-v1 for topics. A run of a version the platform no longer knows ends FAILED.
stateQUEUED, RUNNING, then SUCCEEDED, FAILED or CANCELLED. The verdict is a separate question: a SUCCEEDED run may say the article needs a person.
stepsEvery step of the pipeline with its state — PENDING, RUNNING, WAITING, SUCCEEDED, FAILED, SKIPPED, CANCELLED — the ai_executions entry behind an agent step, the locale and view_ids of a translation step, why a waiting step waits and until when, its automatic retries, its error, and the skipped_fields a step left to the person who had edited them.
verdictWhat the run's checks, its reviewer and its parts made of the article: result (PASSED or NEEDS_REVIEW), the reviewer's score, and every issue with its code, severity, message, the step it came from and, for a translation, its locale. Present once the checks ran; final when the run is.
articleThe article as the writer produced it and the desk rendered it — the structured document the post's HTML was printed from and the translator received. The run's revision of the text, kept whatever happens to the post.
resultWhere the run was applied. An ARTICLE run: the target_id of the post it wrote, the view_ids it localised, and the media_id of the cover it put in the media library. A TOPICS run: created_topic_ids and duplicates_skipped.
costWhat the run's executions were charged to the AI balance, summed, as Money. Absent while none was charged — a run entirely on the account's own key.
policy_snapshotThe editorial AI policy as it was when the run was created. Editing the policy does not change a run in flight; auto_publish alone is read at the date.
errorWhy a FAILED run stopped, in the same shape as an API error: code, status, message and a PRECONDITION_FAILURE whose type names the reason.
end_timeWhen the run reached a final state (RFC 3339, UTC).
Cancel (editorial generation)
Stops a live run. Its AI executions are cancelled with it — one that is mid-call finishes that call and is dropped. A slot whose article was not yet written goes back to FAILED with the reason; one whose article was already applied keeps it and is DRAFTED with NEEDS_REVIEW, since a person now has to look at what the run left unfinished. A run that has already finished answers FAILED_PRECONDITION (GENERATION_FINISHED). A cancelled run never restarts by itself: :retry it, or create a new one.
path Parameters
website_idId of the parent website.
editorial_generation_idId of the parent editorial_generation.
Cancel (editorial generation) › Request Body optional
Cancel (editorial generation) › Responses
The affected resource, or the method’s own response object (§10).
Retry (editorial generation)
Resumes a FAILED run at the step that failed, with the same policy snapshot and the same article where one was already written. The failed step retries its own AI execution where the platform still takes it, and gets a new one where it does not. The slot moves back to GENERATING. Any other state answers FAILED_PRECONDITION (GENERATION_NOT_FAILED); so does a slot that has since moved on to a newer run. A run that failed applying what it had already produced — the content type refused the article, say — would fail the same way again, and answers FAILED_PRECONDITION (STEP_NOT_RETRYABLE, naming the step): create a new run for the slot instead.
path Parameters
website_idId of the parent website.
editorial_generation_idId of the parent editorial_generation.
Retry (editorial generation) › Request Body optional
Retry (editorial generation) › Responses
The affected resource, or the method’s own response object (§10).