> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Gemini Generate Content

> Generate content using a Gemini-compatible AIsa model

## Request contract

* **Method and path:** POST /models/\{model}:generateContent
* **Request URL template:** `https://api.aisa.one/v1beta/models/{model}:generateContent`
* **model:** path; required

[Complete OpenAPI definition](https://aisa.one/docs/reference-contracts/gemini-openapi.json)

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "generateContent",
  "method": "POST",
  "path": "/models/{model}:generateContent",
  "servers": [
    {
      "description": "Gemini-compatible API base URL",
      "url": "https://api.aisa.one/v1beta"
    }
  ],
  "parameters": [
    {
      "description": "The AIsa model ID to use, for example: gemini-3.5-flash.",
      "in": "path",
      "name": "model",
      "required": true,
      "schema": {
        "example": "gemini-3.5-flash",
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/GenerateContentRequest"
        }
      }
    },
    "required": true
  },
  "components": {
    "schemas": {
      "GenerateContentRequest": {
        "properties": {
          "cachedContent": {
            "description": "Optional cached content ID",
            "type": "string"
          },
          "contents": {
            "description": "Content of the conversation, required",
            "items": {
              "$ref": "#/components/schemas/Content"
            },
            "type": "array"
          },
          "generationConfig": {
            "$ref": "#/components/schemas/GenerationConfig"
          },
          "safetySettings": {
            "items": {
              "$ref": "#/components/schemas/SafetySetting"
            },
            "type": "array"
          },
          "systemInstruction": {
            "$ref": "#/components/schemas/Content"
          },
          "toolConfig": {
            "description": "Optional tool configuration",
            "type": "object"
          },
          "tools": {
            "description": "Optional tools the model can use",
            "items": {
              "$ref": "#/components/schemas/Tool"
            },
            "type": "array"
          }
        },
        "required": [
          "contents"
        ],
        "type": "object"
      },
      "Content": {
        "additionalProperties": true,
        "properties": {
          "parts": {
            "items": {
              "$ref": "#/components/schemas/Part"
            },
            "type": "array"
          },
          "role": {
            "enum": [
              "user",
              "model",
              "system",
              "assistant"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "Part": {
        "additionalProperties": true,
        "properties": {
          "inline_data": {
            "description": "Inline binary data for multimodal content.",
            "type": "object"
          },
          "text": {
            "description": "Generated or input text content.",
            "type": "string"
          },
          "thoughtSignature": {
            "description": "Provider-generated thought signature metadata.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "GenerationConfig": {
        "type": "object"
      },
      "SafetySetting": {
        "type": "object"
      },
      "Tool": {
        "type": "object"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "bearerFormat": "API Key",
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```


## OpenAPI

````yaml reference-contracts/gemini-openapi.json POST /models/{model}:generateContent
openapi: 3.0.3
info:
  description: AIsa Gemini-compatible API for native generateContent requests.
  title: Gemini-compatible Generate Content API
  version: v1beta
servers:
  - description: Gemini-compatible API base URL
    url: https://api.aisa.one/v1beta
security:
  - BearerAuth: []
paths:
  /models/{model}:generateContent:
    post:
      summary: Generate content using a Gemini-compatible AIsa model
      operationId: generateContent
      parameters:
        - description: 'The AIsa model ID to use, for example: gemini-3.5-flash.'
          in: path
          name: model
          required: true
          schema:
            example: gemini-3.5-flash
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateContentRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateContentResponse'
          description: Successful content generation
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Error response
      security:
        - BearerAuth: []
components:
  schemas:
    GenerateContentRequest:
      properties:
        cachedContent:
          description: Optional cached content ID
          type: string
        contents:
          description: Content of the conversation, required
          items:
            $ref: '#/components/schemas/Content'
          type: array
        generationConfig:
          $ref: '#/components/schemas/GenerationConfig'
        safetySettings:
          items:
            $ref: '#/components/schemas/SafetySetting'
          type: array
        systemInstruction:
          $ref: '#/components/schemas/Content'
        toolConfig:
          description: Optional tool configuration
          type: object
        tools:
          description: Optional tools the model can use
          items:
            $ref: '#/components/schemas/Tool'
          type: array
      required:
        - contents
      type: object
    GenerateContentResponse:
      additionalProperties: true
      properties:
        candidates:
          items:
            $ref: '#/components/schemas/Candidate'
          type: array
        modelVersion:
          type: string
        responseId:
          type: string
        usageMetadata:
          $ref: '#/components/schemas/UsageMetadata'
      type: object
    ErrorResponse:
      properties:
        error:
          properties:
            code:
              type: integer
            message:
              type: string
            status:
              type: string
          type: object
      type: object
    Content:
      additionalProperties: true
      properties:
        parts:
          items:
            $ref: '#/components/schemas/Part'
          type: array
        role:
          enum:
            - user
            - model
            - system
            - assistant
          type: string
      type: object
    GenerationConfig:
      type: object
    SafetySetting:
      type: object
    Tool:
      type: object
    Candidate:
      additionalProperties: true
      properties:
        content:
          $ref: '#/components/schemas/Content'
        finishReason:
          type: string
        index:
          type: integer
        safetyRatings:
          items:
            type: object
          type: array
      type: object
    UsageMetadata:
      additionalProperties: true
      properties:
        candidatesTokenCount:
          type: integer
        promptTokenCount:
          type: integer
        totalTokenCount:
          type: integer
      type: object
    Part:
      additionalProperties: true
      properties:
        inline_data:
          description: Inline binary data for multimodal content.
          type: object
        text:
          description: Generated or input text content.
          type: string
        thoughtSignature:
          description: Provider-generated thought signature metadata.
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: API Key
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.