# Gemini 3.6 Flash API

> Google's newest speed-optimized multimodal model — fast text, vision, and reasoning.

- **Provider**: Google
- **Model id**: `gemini-3-6-flash`
- **Modality**: text
- **Price**: 44–220 credits

## Overview

Gemini 3.6 Flash is called in two steps: create a generation task, then poll the task until the result is ready.

## Authentication

All requests require a Bearer Token in the request header:

```
Authorization: Bearer YOUR_API_KEY
```

## Create Task

`POST https://you.bot/api/v1/generate`

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| modelId | string | Yes | Model id: `gemini-3-6-flash` |
| input | object | Yes | Input parameters object (see below) |
| callbackUrl | string | No | https URL to receive a signed webhook on completion |

### input object parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| prompt | string | Yes | Text value (default: If gravity took the day off, describe in one playful paragraph what the morning commute would look like.) |
| memory | boolean | No | Automatically append previous messages to maintain multi-turn context. May increase token usage. (true/false) (default: false) |
| function_calling | boolean | No | Lets you define functions that Gemini can call (true/false) (default: false) |
| google_search | boolean | No | Use Google Search (true/false) (default: true) |
| thinking | boolean | No | Include the model's thinking process in the response (true/false) (default: true) |
| system | string | No | System instruction for the model. Defaults to "You are Gemini 3.6 Flash, developed by Google." when omitted. |

### Request example

```json
{
  "modelId": "gemini-3-6-flash",
  "input": {
    "prompt": "Explain how diffusion models generate images, in two short sentences.",
    "memory": false,
    "function_calling": false,
    "google_search": true,
    "thinking": true
  }
}
```

### Response example

```json
{
  "taskId": "281e5b0…f39b9",
  "creditsCharged": 24
}
```

## Query Task

`GET https://you.bot/api/v1/task/{taskId}?model=gemini-3-6-flash`

When `state` is `success`, the output is in `resultUrls`: `{ "text": "…" }`. (Text models return inline in the create response.)

## Error Codes

| Code | Description |
|------|-------------|
| 200 | Request successful |
| 400 | Invalid request parameters |
| 401 | Authentication failed, check API Key |
| 402 | Insufficient account balance |
| 422 | Parameter validation failed |
| 429 | Request rate limit exceeded |
| 500 | Internal server error |
