google/gemini-3.5-flash 🖼️🔢📝❓ → 📝

⭐ Official ▶️ 668.2K runs 📅 May 2026 ⚙️ Cog 0.23.0
code-generation data-analysis document-summarization image-analysis image-to-text multimodal question-answering text-generation text-translation visual-understanding

Performance

9.7sTypical run time
668.2KTotal runs

About

Google's fast multimodal model with frontier reasoning across agents, coding, and long-context tasks

Example Output

Prompt:

"Write assembly code to describe moving a file from one folder to another"

Output

To move a file in assembly, we use the operating system's system calls. In modern operating systems, "moving" a file within the same filesystem is achieved by renaming its path.

Here is the assembly code written for Linux x86_64 using NASM syntax. It uses the sys_rename system call (system call number 82).

Assembly Code (Linux x86_64)

section .data
    ; Define the source and destination paths (must be null-terminated)
    src_path db "/tmp/folder_A/myfile.txt", 0
    dst_path db "/tmp/folder_B/myfile.txt", 0

    ; Error/Success messages
    success_msg db "File moved successfully!", 10, 0
    success_len equ $ - success_msg
    error_msg   db "Error moving file.", 10, 0
    error_len   equ $ - error_msg

section .text
    global _start

_start:
    ;---------------------------------------------------------
    ; sys_rename (syscall 82)
    ; Arguments:
    ;   rax = 82 (syscall number for sys_rename)
    ;   rdi = const char *oldpath (source)
    ;   rsi = const char *newpath (destination)
    ;---------------------------------------------------------
    mov rax, 82             ; syscall number for sys_rename
    mov rdi, src_path       ; pointer to old path
    mov rsi, dst_path       ; pointer to new path
    syscall                 ; call kernel

    ; Check the return value in RAX
    ; In Linux, a negative return value indicates an error (e.g., -2 for file not found)
    test rax, rax
    js .on_error            ; Jump if Sign flag is set (RAX is negative)

    ; If successful, print success message
    mov rax, 1              ; sys_write
    mov rdi, 1              ; stdout
    mov rsi, success_msg    ; message pointer
    mov rdx, success_len    ; message length
    syscall
    jmp .exit

.on_error:
    ; If failed, print error message
    mov rax, 1              ; sys_write
    mov rdi, 1              ; stdout
    mov rsi, error_msg      ; message pointer
    mov rdx, error_len      ; message length
    syscall
    jmp .exit_failure

.exit:
    ; Exit program with status 0 (success)
    mov rax, 60             ; sys_exit
    xor rdi, rdi            ; exit code 0
    syscall

.exit_failure:
    ; Exit program with status 1 (error)
    mov rax, 60             ; sys_exit
    mov rdi, 1              ; exit code 1
    syscall

How to Compile and Run (Linux)

To test this code, you will need nasm (Netwide Assembler) and ld (GNU Linker).

  1. Create the dummy folders and file to test:

    mkdir -p /tmp/folder_A /tmp/folder_B
    touch /tmp/folder_A/myfile.txt
    
  2. Save the assembly code into a file named move.asm.

  3. Assemble and link the code:

    nasm -f elf64 move.asm -o move.o
    ld move.o -o move
    
  4. Run the executable:

    ./move
    

How it Works (Under the Hood)

  1. The Rename Syscall (sys_rename): Moving a file is technically a "rename" operation in the OS kernel. It updates the directory entry pointers rather than physically rewriting the file data on the disk (as long as it remains on the same partition).
  2. Registers:
    • rax holds the system call ID (82 for rename, 1 for write, 60 for exit).
    • rdi and rsi pass the pointers of our source and destination strings to the kernel.
  3. Error Handling: The CPU test rax, rax checks if the kernel returned a negative number (error). If so, it branches to the error printing section.

Performance Metrics

9.69s Prediction Time
9.74s Total Time
All Input Parameters
{
  "top_p": 0.95,
  "images": [],
  "prompt": "Write assembly code to describe moving a file from one folder to another",
  "videos": [],
  "temperature": 1,
  "thinking_level": "none",
  "max_output_tokens": 65535
}
Input Parameters
audio Type: stringDefault: null
Input audio to send with the prompt (max 1 audio file, up to 8.4 hours)
top_p Type: numberDefault: 0.95Range: 0 - 1
Nucleus sampling parameter - the model considers the results of the tokens with top_p probability mass
images Type: arrayDefault:
Input images to send with the prompt (max 10 images, each up to 7MB)
prompt (required) Type: string
The text prompt to send to the model
videos Type: arrayDefault:
Input videos to send with the prompt (max 10 videos, each up to 45 minutes)
video_fps Type: numberDefault: nullRange: 0.1 - 60
Frame rate (frames per second) at which to sample input videos. Higher values give the model more frames to reason over (useful for fast-moving footage) but consume more tokens. Omit to use the default sampling rate (1 fps).
temperature Type: numberDefault: 1Range: 0 - 2
Sampling temperature between 0 and 2
thinking_level Default: none
Thinking level for reasoning (low or high). Replaces thinking_budget for Gemini 3 models.
max_output_tokens Type: integerDefault: 65535Range: 1 - 65535
Maximum number of tokens to generate
system_instruction Type: stringDefault: null
System instruction to guide the model's behavior
Output Schema

Output

Type: array • Items Type: string

Example Execution Logs
No sid
Generating text with gemini-3.5-flash...
Warning: there are non-text parts in the response: ['thought_signature'], returning concatenated text result from text parts. Check the full candidates.content.parts accessor to get the full model response.
Warning: there are non-text parts in the response: ['thought_signature'], returning concatenated text result from text parts. Check the full candidates.content.parts accessor to get the full model response.
Text generation completed in 9.54s
Input token count: 13
Output token count: 998
Version Details
Version ID
f1f4ac4b15e9cb4bb13555d222fa247dbc136ac6d4d545a96033619ebd7bc5dd
Version Created
October 6, 2026
Run on Replicate →