Export an artifact to Google Docs or Sheets

October 15, 2026

Table of contents

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

Save a finished Studio artifact as a new file in the Google Drive of the account that holds it, the Export menu of the Gemini Notebook web app. Reports become a Google Doc. Data tables become a Google Sheet. The response carries the link to the new file.

destination Artifact type Creates
docs report a Google Doc
sheets table a Google Sheet

Only a completed artifact can be exported. The new file belongs to the Google account that holds the notebook.

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

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:3c8b3e5e-4534-4430-aeb3-db347161a1ad",
  "destination": "docs",
  "title": "Apollo 11 briefing"
}
  • artifact is required, the artifact id from GET /artifacts or from the artifact field of a job. The id names its account and notebook, so no email is needed.
  • destination is required, where to export.
    Supported values: docs (for report), sheets (for table).
  • title is optional, the new file’s name, up to 200 characters.
    Default: the artifact’s title.
Responses
  • 201 Created

    A report exported to Google Docs:

    {
      "artifact": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:3c8b3e5e-4534-4430-aeb3-db347161a1ad",
      "destination": "docs",
      "url": "https://docs.google.com/document/d/1AbCdEfGhIjKlMnOpQrStUvWxYz0123456789aBcDeF"
    }
    

    A data table exported to Google Sheets:

    {
      "artifact": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:a92e5eee-f9a6-4640-906f-7b79b481e555",
      "destination": "sheets",
      "url": "https://docs.google.com/spreadsheets/d/1ZyXwVuTsRqPoNmLkJiHgFeDcBa9876543210zYxWvU/edit"
    }
    
  • 400 Bad Request

    A missing or invalid parameter, or a destination that does not take this artifact’s type.

    {
      "error": "destination sheets takes table (this one is report)",
      "code": 400
    }
    
    {
      "error": "Parameter destination (pdf) valid values: docs,sheets",
      "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:3c8b3e5e-4534-4430-aeb3-db347161a1ad 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:3c8b3e5e-4534-4430-aeb3-db347161a1ad not found",
      "code": 404
    }
    
  • 409 Conflict

    The artifact has not completed.

    {
      "error": "Only a completed artifact can be exported (this one is processing)",
      "code": 409
    }
    
  • 502 Bad Gateway

    Google answered without a link to the new file. The file may exist anyway, so look in the account’s Google Drive before you export again.

    {
      "error": "Google answered the export without a document link: it may have been created anyway, check the account's Google Drive before retrying",
      "code": 502
    }
    
  • 503 Service Unavailable

    Google is temporarily unavailable or is challenging our network. Retry in a few minutes.

    {
      "error": "GOOGLE_BOT_CHECK: Google is challenging our network right now, please retry in a few minutes",
      "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
    }
    
Model
{ // TypeScript, all fields are optional
  artifact: string             // the exported artifact's id
  destination: 'docs' | 'sheets'
  url: string                  // the new Google Doc or Sheet in the account's Google Drive
  error: string                // error responses only
  code: number                 // error responses only, the HTTP status
}
Examples
  • curl -X POST "https://api.useapi.net/v1/gemini-notebook/artifacts/export" \
       -H "Content-Type: application/json" \
       -H "Authorization: Bearer …" \
       -d '{
         "artifact": "user:[email protected]:d02c903b-17f8-4241-a263-2be9e7359d55:3c8b3e5e-4534-4430-aeb3-db347161a1ad",
         "destination": "docs",
         "title": "Apollo 11 briefing"
       }'
    
  • const token = "API token";
    const artifact = "user:[email protected]:...";
    const response = await fetch("https://api.useapi.net/v1/gemini-notebook/artifacts/export", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer ${token}`
      },
      body: JSON.stringify({ artifact, destination: "sheets" })
    });
    const result = await response.json();
    console.log("response", response.status, result);
    
  • import requests
    
    token = "API token"
    artifact = "user:[email protected]:..."
    response = requests.post(
        "https://api.useapi.net/v1/gemini-notebook/artifacts/export",
        headers={"Content-Type": "application/json", "Authorization": f"Bearer {token}"},
        json={"artifact": artifact, "destination": "docs", "title": "Apollo 11 briefing"}
    )
    print(response.status_code, response.json())
    
Try It