Retry a failed artifact

September 29, 2026

Table of contents

  1. Request Headers
  2. Request Body
  3. Responses
  4. Model
  5. Examples
  6. Try It

Ask Google to run a failed Studio artifact again, in place in its notebook. The retry takes no generation options of its own. Use it when a job from POST /artifacts ends with error.code: "generation_failed", or when GET /artifacts lists an artifact with status: "failed".

Only an artifact whose status is failed can be retried. Any other status returns 409.

The retry is a job, exactly like a new generation. It takes the artifact’s own type, it counts toward the account’s maxJobs, and Google can refuse it with 429 when its usage window is short. mode, replyUrl and replyRef behave as on POST /artifacts: sync waits up to 90 seconds, async returns 201 at once, and GET /jobs/jobid returns the result.

https://api.useapi.net/v1/gemini-notebook/artifacts/retry

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
Request Body
{
  "artifact": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:0c2ba8dc-47dd-474f-a19c-c06896e269fd",
  "mode": "async",
  "replyUrl": "https://your-domain.com/webhook",
  "replyRef": "apollo-audio-retry"
}
  • artifact is required, the failed artifact’s id, from the job’s artifact field or from GET /artifacts. The id names its account and notebook, so no email is needed.
  • mode is optional, sync (default, waits up to 90 seconds) or async (returns 201 at once).
  • replyUrl is optional, a public http(s) URL that receives one POST of the job record when the job completes or fails. See GET /jobs/jobid for the record’s shape.
  • replyRef is optional, your own reference echoed back in the job record, up to 1024 characters.
Responses
  • 200 OK

    Sync mode, finished within 90 seconds. result has the same shape as on POST /artifacts for the artifact’s type.

    {
      "jobid": "job:6a0d2f4e-91c3-4b7a-8e25-3fd1c09b7a64-user:[email protected]:gemini_notebook",
      "email": "[email protected]",
      "type": "mindmap",
      "status": "completed",
      "notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55",
      "artifact": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:3758acd1-12fe-45e3-badd-6b3996945b96",
      "created_at": "2026-09-27T23:40:02.646Z",
      "request": {
        "artifact": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:3758acd1-12fe-45e3-badd-6b3996945b96"
      },
      "completed_at": "2026-09-27T23:40:35.803Z",
      "result": {
        "title": "Apollo Mindmap",
        "content": {
          "name": "Apollo 11 Mission",
          "children": [
            {
              "name": "Background & Objectives",
              "children": [ { "name": "First Human Lunar Landing" }, { "name": "Kennedy's 1961 Goal" } ]
            },
            ...
          ]
        }
      }
    }
    
  • 201 Created

    Async mode. Poll GET /jobs/jobid until status is completed or failed.

    {
      "jobid": "job:b84e1c07-2d6f-4f3a-9c51-e07a4d2b9f18-user:[email protected]:gemini_notebook",
      "email": "[email protected]",
      "type": "audio",
      "status": "pending",
      "notebook": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55",
      "artifact": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:0c2ba8dc-47dd-474f-a19c-c06896e269fd",
      "created_at": "2026-09-28T01:12:44.180Z",
      "request": {
        "artifact": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:0c2ba8dc-47dd-474f-a19c-c06896e269fd"
      },
      "replyUrl": "https://your-domain.com/webhook",
      "replyRef": "apollo-audio-retry"
    }
    
  • 202 Accepted

    Sync mode, still running after 90 seconds. The body is the running job record, as in the 201 tab. Poll GET /jobs/jobid for the result.

  • 400 Bad Request

    {
      "error": "Parameter artifact is not a valid artifact id",
      "code": 400
    }
    
  • 401 Unauthorized

    Invalid API token.

    {
      "error": "useapi.net ⁝ Unauthorized",
      "code": 401
    }
    
  • 403 Forbidden

    The artifact id belongs to a different API token.

    {
      "error": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:0c2ba8dc-47dd-474f-a19c-c06896e269fd does not belong to this API token",
      "code": 403
    }
    
  • 404 Not Found

    The artifact is no longer in its notebook, or the account it names is not configured.

    {
      "error": "Artifact user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:0c2ba8dc-47dd-474f-a19c-c06896e269fd not found",
      "code": 404
    }
    
  • 409 Conflict

    The artifact has not failed.

    {
      "error": "Only a failed artifact can be retried (this one is completed)",
      "code": 409
    }
    
  • 422 Unprocessable Content

    Sync mode, Google reported the generation as failed again. The body is the failed job record with error.code: "generation_failed".

  • 429 Too Many Requests

    The account already runs maxJobs jobs:

    {
      "error": "Account [email protected] is busy: 3/3 jobs running (maxJobs)",
      "code": 429
    }
    

    Or Google refused the job because not enough of its usage window is left, before any job was created. retryAt is when the window resets and window is 5h or weekly, both present only when Google’s refusal names the window. See GET /accounts/email:

    {
      "error": "Not enough of Google's 5h window is left on account [email protected] for this job; it resets at 2026-09-28T04:25:40.000Z. GET /accounts/[email protected] shows what each job needs",
      "code": 429,
      "retryAt": "2026-09-28T04:25:40.000Z",
      "window": "5h"
    }
    
  • 503 Service Unavailable

    A temporary condition, retry in a few minutes.

    {
      "error": "Async mode is unavailable right now, use mode sync",
      "code": 503
    }
    

    The job could not be added to our job schedule. It is failed at once with error.code: "scheduler". Google may already have started the generation, since only a one-shot request creates the artifact inside the job. Check GET /artifacts before you submit it again.

    {
      "error": "Unable to lock the job schedule of user 12345, please retry",
      "code": 503
    }
    
    {
      "error": "Failed to create the job schedule (QStash HTTP 500): …",
      "code": 503
    }
    
  • 596 Account Error

    Google reported the account as signed out. While we re-check it, the answer is the first message below. Retry in about a minute. If it stays signed out, the account is paused, you receive an email, and the answer becomes the second message until you re-add it via Setup Gemini Notebook.

    {
      "error": "Google reported this account as signed out. We are re-checking it — please retry in about a minute. If it stays signed out, you will receive a re-add email.",
      "code": 596
    }
    
    {
      "error": "Account [email protected]: Google signed this account out. Re-add it at https://useapi.net/docs/start-here/setup-gemini-notebook",
      "code": 596
    }
    

    In sync mode, a job whose account is confirmed signed out while it runs answers 596 with the failed job record (error.code: "account").

Model

The job record, the same shape as POST /artifacts returns. request echoes artifact, and type is the retried artifact’s type. The full field list is on GET /jobs/jobid.

{ // TypeScript, all fields are optional
  jobid: string                  // job:<uuid>-user:<id>-<email>-bot:gemini_notebook
  email: string                  // the account the job runs on
  type: 'audio' | 'video' | 'report' | 'interactive_report' | 'table' | 'quiz' | 'flashcards' | 'infographic' | 'slides' | 'mindmap' | 'research'
  status: 'pending' | 'processing' | 'completed' | 'failed'
  notebook: string               // notebook id; for a one-shot, the notebook created for it
  artifact?: string              // artifact id, once Google has created it (never on a research job)
  created_at: string             // ISO 8601, when the job was accepted
  updated_at?: string            // one-shot only: when its artifact was created
  completed_at?: string          // ISO 8601, when the job completed or failed
  request: Record<string, unknown>   // your request body echoed back (ids as strings), without mode, replyUrl and replyRef
  replyUrl?: string
  replyRef?: string
  warnings?: string[]            // one-shot only: sources Google could not process and that were left out
  error?: {                      // status 'failed'
    code: 'quota' | 'account' | 'not_found' | 'sources' | 'generation_failed' | 'timeout' | 'google_error' | 'scheduler' | 'cancelled'
    message: string
    retryAt?: string             // code 'quota', when Google names the window: ISO 8601 time it resets
  }
  result?: {                     // status 'completed', a Studio artifact
    title: string
    duration?: number            // audio, video: seconds
    files?: Array<{              // audio, video, infographic, slides
      format: 'm4a' | 'mp4' | 'png' | 'pdf' | 'pptx'
      mimeType: string
      url: string                // GET /artifacts/download link, needs your API token
      width?: number             // infographic
      height?: number
    }>
    slides?: Array<{             // slides
      image: string              // GET /artifacts/download link (format=slide&index=N)
      caption: string | null
      text: string | null
    }>
    text?: string                // report (Markdown), interactive_report, infographic
    table?: string[][]           // table: rows of cells, header row first
    content?: unknown            // quiz, flashcards, mindmap: Google's JSON
  } | {                          // status 'completed', type 'research' (POST /research)
    mode: 'fast' | 'deep'
    query: string
    summary?: string             // fast: Google's one-line summary of what it found
    report?: {                   // deep: the Deep Research report
      title: string
      markdown: string
    }
    noResults?: true             // the run found nothing (sources is [])
    sources: Array<{
      url: string
      title: string
      description: string | null
      cited: boolean             // deep: the report cites it. fast: always true
    }>
  }
}
Examples
  • curl -X POST "https://api.useapi.net/v1/gemini-notebook/artifacts/retry" \
       -H "Content-Type: application/json" \
       -H "Authorization: Bearer …" \
       -d '{
         "artifact": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:0c2ba8dc-47dd-474f-a19c-c06896e269fd",
         "mode": "async"
       }'
    
  • const token = "API token";
    const artifact = "user:[email protected]:...";
    const response = await fetch("https://api.useapi.net/v1/gemini-notebook/artifacts/retry", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer ${token}`
      },
      body: JSON.stringify({ artifact, mode: "async" })
    });
    const job = await response.json();
    console.log("response", response.status, job);
    
  • import requests
    
    token = "API token"
    artifact = "user:[email protected]:..."
    response = requests.post(
        "https://api.useapi.net/v1/gemini-notebook/artifacts/retry",
        headers={"Content-Type": "application/json", "Authorization": f"Bearer {token}"},
        json={"artifact": artifact, "mode": "async"}
    )
    print(response.status_code, response.json())
    
Try It