openapi: 3.1.0
info:
  version: 1.0.0
  title: OpenAPI
components:
  schemas: {}
  parameters: {}
paths:
  /signup/anon:
    post:
      tags:
        - Authentication
      summary: Anonymous trial signup
      description: >-
        Returns trial key; no auth required. Limited to one trial per IP address
        per 30 days.
      operationId: post_AuthSignupAnon
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties: {}
      responses:
        '200':
          description: Trial API key generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_key:
                    type: string
                    description: Trial API key
                required:
                  - api_key
        '429':
          description: Rate limit exceeded - one trial per IP per 30 days
          headers:
            Retry-After:
              schema:
                type: string
              required: true
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
  /v1/chart:
    get:
      tags:
        - Charts
      summary: Render chart from URL-encoded config
      description: >-
        Fastest option for emails, Slack integrations. Renders chart image from
        URL parameters. Authenticate with X-Api-Key header or api_key query
        parameter.
      operationId: get_ChartRender
      parameters:
        - schema:
            anyOf:
              - type: string
                description: Chart.js config as JSON string
              - type: object
                additionalProperties: {}
                description: Chart.js config as object
            description: Chart.js config as object or JSON string
          required: false
          description: Chart.js config as object or JSON string
          name: chart
          in: query
        - schema:
            anyOf:
              - type: string
                description: Chart.js config as JSON string
              - type: object
                additionalProperties: {}
                description: Chart.js config as object
            description: Alias for chart
          required: false
          description: Alias for chart
          name: c
          in: query
        - schema:
            type: string
            enum: &ref_0
              - png
              - svg
            default: png
          required: false
          name: format
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 2000
            description: Image width in pixels
          required: true
          description: Image width in pixels
          name: width
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 2000
            description: Image height in pixels
          required: true
          description: Image height in pixels
          name: height
          in: query
        - schema:
            type: string
            description: CSS color string, 'transparent' allowed
          required: false
          description: CSS color string, 'transparent' allowed
          name: backgroundColor
          in: query
        - schema:
            type: string
            description: API key for authentication (alternative to X-Api-Key header)
          required: false
          description: API key for authentication (alternative to X-Api-Key header)
          name: api_key
          in: query
        - schema:
            type: string
            description: API key for authentication
          required: false
          description: API key for authentication
          name: X-Api-Key
          in: header
      responses:
        '200':
          description: Chart image rendered successfully
          content:
            image/png:
              schema:
                type: string
                description: Binary PNG image data
            image/svg+xml:
              schema:
                type: string
                description: SVG image data
        '400':
          description: Bad input - invalid configuration
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '401':
          description: Unauthorized - invalid API key or signature
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '500':
          description: Internal server error during rendering
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
    post:
      tags:
        - Charts
      summary: Render chart from JSON body
      description: >-
        Handles big or JS-function configs. For server code, Zapier, low-code
        tools. Authenticate with X-Api-Key header or api_key query parameter.
      operationId: post_ChartRenderPost
      parameters:
        - schema:
            type: string
            description: API key for authentication (alternative to X-Api-Key header)
          required: false
          description: API key for authentication (alternative to X-Api-Key header)
          name: api_key
          in: query
        - schema:
            type: string
            description: API key for authentication
          required: false
          description: API key for authentication
          name: X-Api-Key
          in: header
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                chart:
                  anyOf:
                    - type: string
                      description: Chart.js config as JSON string
                    - type: object
                      additionalProperties: {}
                      description: Chart.js config as object
                  description: Chart.js config as object or JSON string
                c:
                  anyOf:
                    - type: string
                      description: Chart.js config as JSON string
                    - type: object
                      additionalProperties: {}
                      description: Chart.js config as object
                  description: Alias for chart
                format:
                  type: string
                  enum: *ref_0
                  default: png
                width:
                  type: integer
                  minimum: 1
                  maximum: 2000
                  description: Image width in pixels
                height:
                  type: integer
                  minimum: 1
                  maximum: 2000
                  description: Image height in pixels
                backgroundColor:
                  type: string
                  description: CSS color string, 'transparent' allowed
              required:
                - width
                - height
      responses:
        '200':
          description: Chart image rendered successfully
          content:
            image/png:
              schema:
                type: string
                description: Binary PNG image data
            image/svg+xml:
              schema:
                type: string
                description: SVG image data
        '400':
          description: Bad input - invalid configuration
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '401':
          description: Unauthorized - invalid API key or signature
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '500':
          description: Internal server error during rendering
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
  /v1/chart/create:
    post:
      tags:
        - Charts
      summary: Create permanent signed short URL
      description: >-
        Return a permanent, signed short URL that never exposes your secret. For
        no-code users who just want a link to paste. Authenticate with X-Api-Key
        header or api_key query parameter.
      operationId: post_ChartCreate
      parameters:
        - schema:
            type: string
            description: API key for authentication (alternative to X-Api-Key header)
          required: false
          description: API key for authentication (alternative to X-Api-Key header)
          name: api_key
          in: query
        - schema:
            type: string
            description: API key for authentication
          required: false
          description: API key for authentication
          name: X-Api-Key
          in: header
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                chart:
                  anyOf:
                    - type: string
                      description: Chart.js config as JSON string
                    - type: object
                      additionalProperties: {}
                      description: Chart.js config as object
                  description: Chart.js config as object or JSON string
                c:
                  anyOf:
                    - type: string
                      description: Chart.js config as JSON string
                    - type: object
                      additionalProperties: {}
                      description: Chart.js config as object
                  description: Alias for chart
                format:
                  type: string
                  enum: *ref_0
                  default: png
                width:
                  type: integer
                  minimum: 1
                  maximum: 2000
                  description: Image width in pixels
                height:
                  type: integer
                  minimum: 1
                  maximum: 2000
                  description: Image height in pixels
                backgroundColor:
                  type: string
                  description: CSS color string, 'transparent' allowed
              required:
                - width
                - height
      responses:
        '201':
          description: Short URL created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    description: Short URL for the chart
                required:
                  - url
        '400':
          description: Bad input - invalid configuration
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
  /v1/chart/{id}:
    get:
      tags:
        - Charts
      summary: Resolve short URL and serve cached image
      description: >-
        Resolve the short URL created by /v1/chart/create and serve the cached
        chart image. For browsers, mail clients, social bots.
      operationId: get_ChartResolve
      parameters:
        - schema:
            type: string
            description: Chart ID from the short URL
          required: true
          description: Chart ID from the short URL
          name: id
          in: path
      responses:
        '200':
          description: Chart image served successfully
          content:
            image/png:
              schema:
                type: string
                description: Binary PNG image data
            image/svg+xml:
              schema:
                type: string
                description: SVG image data
        '404':
          description: Chart not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '500':
          description: Internal server error during rendering
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
  /v1/open/chart:
    get:
      tags:
        - Charts
      summary: Open (no-auth) chart render — config in URL
      description: >-
        Public, unauthenticated chart endpoint. Pass a Chart.js config in the
        `c` query parameter (URL-encoded JSON) or use the `type` / `data` /
        `labels` shortcut. Every render carries a small 'chartly.dev' watermark
        and the `X-Edit-Url` response header points back to the playground.
        Rate-limited per IP; for production use, get an API key and call
        /v1/chart instead.
      operationId: get_OpenChartRender
      parameters:
        - schema:
            type: string
            description: URL-encoded Chart.js JSON config
          required: false
          description: URL-encoded Chart.js JSON config
          name: c
          in: query
        - schema:
            type: string
            enum:
              - bar
              - line
              - pie
              - doughnut
            description: Shortcut chart type when not using full config
          required: false
          description: Shortcut chart type when not using full config
          name: type
          in: query
        - schema:
            type: string
            description: 'Shortcut: comma-separated labels (used with type+data)'
          required: false
          description: 'Shortcut: comma-separated labels (used with type+data)'
          name: labels
          in: query
        - schema:
            type: string
            description: 'Shortcut: comma-separated numeric values'
          required: false
          description: 'Shortcut: comma-separated numeric values'
          name: data
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 2000
            description: Width in px, default 500
          required: false
          description: Width in px, default 500
          name: w
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 2000
            description: Height in px, default 300
          required: false
          description: Height in px, default 300
          name: h
          in: query
        - schema:
            type: string
            enum: *ref_0
            default: png
          required: false
          name: format
          in: query
        - schema:
            type: string
            description: CSS background color, default 'white'
          required: false
          description: CSS background color, default 'white'
          name: bkg
          in: query
      responses:
        '200':
          description: Chart image rendered successfully
          content:
            image/png:
              schema:
                type: string
                description: Binary PNG image data
            image/svg+xml:
              schema:
                type: string
                description: SVG image data
        '400':
          description: Bad input
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '500':
          description: Internal server error during rendering
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
  /v1/status:
    get:
      tags:
        - Health
      summary: Health check endpoint
      description: Check API health and configuration status
      operationId: get_StatusEndpoint
      responses:
        '200':
          description: Health status
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  buildHash:
                    type: string
                  kvLatency:
                    type: number
                    description: KV latency in milliseconds
                  oauth:
                    type: object
                    properties:
                      google:
                        type: boolean
                        description: Google OAuth configured
                    required:
                      - google
                    description: OAuth configuration status
                required:
                  - status
                  - oauth
  /v1/zapier/bar-chart:
    post:
      tags:
        - Zapier
      summary: Create Bar Chart (Zapier-friendly)
      description: >-
        Simple bar chart creation for Zapier with user-friendly inputs. No
        complex JSON required - just provide title, labels, and values.
      operationId: post__v1_zapier_bar-chart
      parameters:
        - schema:
            type: string
            description: API key for authentication (alternative to X-Api-Key header)
          required: false
          description: API key for authentication (alternative to X-Api-Key header)
          name: api_key
          in: query
        - schema:
            type: string
            description: API key for authentication
          required: false
          description: API key for authentication
          name: X-Api-Key
          in: header
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: Chart title
                labels:
                  type: string
                  description: Comma-separated labels (e.g., 'Jan,Feb,Mar')
                values:
                  type: string
                  description: Comma-separated values (e.g., '100,200,150')
                color:
                  type: string
                  default: '#3B82F6'
                  description: Bar color (hex code)
                width:
                  type: number
                  default: 800
                  description: Chart width in pixels
                height:
                  type: number
                  default: 400
                  description: Chart height in pixels
                format:
                  type: string
                  enum:
                    - png
                    - svg
                  default: png
                  description: Output format
                backgroundColor:
                  type: string
                  default: white
                  description: Background color
                showLegend:
                  type: boolean
                  default: true
                  description: Show legend
                showGrid:
                  type: boolean
                  default: true
                  description: Show grid lines
              required:
                - title
                - labels
                - values
      responses:
        '201':
          description: Bar chart created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  chart_url:
                    type: string
                    description: Permanent chart URL
                  chart_id:
                    type: string
                    description: Chart ID
                  download_url:
                    type: string
                    description: Direct download URL
                  preview_url:
                    type: string
                    description: Preview URL
                  format:
                    type: string
                    description: Chart format
                  width:
                    type: number
                    description: Chart width
                  height:
                    type: number
                    description: Chart height
                required:
                  - chart_url
                  - chart_id
                  - download_url
                  - preview_url
                  - format
                  - width
                  - height
        '400':
          description: Bad input - invalid configuration
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
  /v1/zapier/line-chart:
    post:
      tags:
        - Zapier
      summary: Create Line Chart (Zapier-friendly)
      description: >-
        Simple line chart creation for Zapier with user-friendly inputs. Perfect
        for time series data and trend visualization.
      operationId: post__v1_zapier_line-chart
      parameters:
        - schema:
            type: string
            description: API key for authentication (alternative to X-Api-Key header)
          required: false
          description: API key for authentication (alternative to X-Api-Key header)
          name: api_key
          in: query
        - schema:
            type: string
            description: API key for authentication
          required: false
          description: API key for authentication
          name: X-Api-Key
          in: header
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: Chart title
                labels:
                  type: string
                  description: Comma-separated labels (e.g., 'Jan,Feb,Mar')
                values:
                  type: string
                  description: Comma-separated values (e.g., '100,200,150')
                color:
                  type: string
                  default: '#10B981'
                  description: Line color (hex code)
                width:
                  type: number
                  default: 800
                  description: Chart width in pixels
                height:
                  type: number
                  default: 400
                  description: Chart height in pixels
                format:
                  type: string
                  enum:
                    - png
                    - svg
                  default: png
                  description: Output format
                backgroundColor:
                  type: string
                  default: white
                  description: Background color
                fillArea:
                  type: boolean
                  default: false
                  description: Fill area under line
                showPoints:
                  type: boolean
                  default: true
                  description: Show data points
                tension:
                  type: number
                  minimum: 0
                  maximum: 1
                  default: 0.4
                  description: Line curve tension (0-1)
                showLegend:
                  type: boolean
                  default: true
                  description: Show legend
                showGrid:
                  type: boolean
                  default: true
                  description: Show grid lines
              required:
                - title
                - labels
                - values
      responses:
        '201':
          description: Line chart created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  chart_url:
                    type: string
                    description: Permanent chart URL
                  chart_id:
                    type: string
                    description: Chart ID
                  download_url:
                    type: string
                    description: Direct download URL
                  preview_url:
                    type: string
                    description: Preview URL
                  format:
                    type: string
                    description: Chart format
                  width:
                    type: number
                    description: Chart width
                  height:
                    type: number
                    description: Chart height
                required:
                  - chart_url
                  - chart_id
                  - download_url
                  - preview_url
                  - format
                  - width
                  - height
        '400':
          description: Bad input - invalid configuration
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
  /v1/zapier/pie-chart:
    post:
      tags:
        - Zapier
      summary: Create Pie Chart (Zapier-friendly)
      description: >-
        Simple pie chart creation for Zapier with user-friendly inputs. Perfect
        for showing proportions and distributions.
      operationId: post__v1_zapier_pie-chart
      parameters:
        - schema:
            type: string
            description: API key for authentication (alternative to X-Api-Key header)
          required: false
          description: API key for authentication (alternative to X-Api-Key header)
          name: api_key
          in: query
        - schema:
            type: string
            description: API key for authentication
          required: false
          description: API key for authentication
          name: X-Api-Key
          in: header
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: Chart title
                labels:
                  type: string
                  description: >-
                    Comma-separated labels (e.g., 'Product A,Product B,Product
                    C')
                values:
                  type: string
                  description: Comma-separated values (e.g., '100,200,150')
                colors:
                  type: string
                  description: >-
                    Comma-separated colors (optional, e.g.,
                    '#FF6384,#36A2EB,#FFCE56')
                width:
                  type: number
                  default: 500
                  description: Chart width in pixels
                height:
                  type: number
                  default: 500
                  description: Chart height in pixels
                format:
                  type: string
                  enum:
                    - png
                    - svg
                  default: png
                  description: Output format
                backgroundColor:
                  type: string
                  default: white
                  description: Background color
                showLegend:
                  type: boolean
                  default: true
                  description: Show legend
                legendPosition:
                  type: string
                  enum:
                    - top
                    - bottom
                    - left
                    - right
                  default: bottom
                  description: Legend position
              required:
                - title
                - labels
                - values
      responses:
        '201':
          description: Pie chart created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  chart_url:
                    type: string
                    description: Permanent chart URL
                  chart_id:
                    type: string
                    description: Chart ID
                  download_url:
                    type: string
                    description: Direct download URL
                  preview_url:
                    type: string
                    description: Preview URL
                  format:
                    type: string
                    description: Chart format
                  width:
                    type: number
                    description: Chart width
                  height:
                    type: number
                    description: Chart height
                required:
                  - chart_url
                  - chart_id
                  - download_url
                  - preview_url
                  - format
                  - width
                  - height
        '400':
          description: Bad input - invalid configuration
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
  /v1/zapier/multi-series-chart:
    post:
      tags:
        - Zapier
      summary: Create Multi-Series Chart (Zapier-friendly)
      description: >-
        Compare multiple datasets with up to 3 series. Perfect for comparing
        sales, metrics, or any data across different categories.
      operationId: post__v1_zapier_multi-series-chart
      parameters:
        - schema:
            type: string
            description: API key for authentication (alternative to X-Api-Key header)
          required: false
          description: API key for authentication (alternative to X-Api-Key header)
          name: api_key
          in: query
        - schema:
            type: string
            description: API key for authentication
          required: false
          description: API key for authentication
          name: X-Api-Key
          in: header
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: Chart title
                labels:
                  type: string
                  description: Comma-separated labels (e.g., 'Jan,Feb,Mar')
                chartType:
                  type: string
                  enum:
                    - bar
                    - line
                  default: bar
                  description: Chart type
                series1_name:
                  type: string
                  description: First series name
                series1_values:
                  type: string
                  description: First series values (comma-separated)
                series1_color:
                  type: string
                  default: '#3B82F6'
                  description: First series color
                series2_name:
                  type: string
                  description: Second series name
                series2_values:
                  type: string
                  description: Second series values (comma-separated)
                series2_color:
                  type: string
                  default: '#10B981'
                  description: Second series color
                series3_name:
                  type: string
                  description: Third series name
                series3_values:
                  type: string
                  description: Third series values (comma-separated)
                series3_color:
                  type: string
                  default: '#F59E0B'
                  description: Third series color
                width:
                  type: number
                  default: 800
                  description: Chart width in pixels
                height:
                  type: number
                  default: 400
                  description: Chart height in pixels
                format:
                  type: string
                  enum:
                    - png
                    - svg
                  default: png
                  description: Output format
                backgroundColor:
                  type: string
                  default: white
                  description: Background color
                showLegend:
                  type: boolean
                  default: true
                  description: Show legend
                showGrid:
                  type: boolean
                  default: true
                  description: Show grid lines
              required:
                - title
                - labels
                - series1_name
                - series1_values
      responses:
        '201':
          description: Multi-series chart created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  chart_url:
                    type: string
                    description: Permanent chart URL
                  chart_id:
                    type: string
                    description: Chart ID
                  download_url:
                    type: string
                    description: Direct download URL
                  preview_url:
                    type: string
                    description: Preview URL
                  format:
                    type: string
                    description: Chart format
                  width:
                    type: number
                    description: Chart width
                  height:
                    type: number
                    description: Chart height
                required:
                  - chart_url
                  - chart_id
                  - download_url
                  - preview_url
                  - format
                  - width
                  - height
        '400':
          description: Bad input - invalid configuration
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
  /billing/webhook:
    post:
      tags:
        - Billing
        - Webhooks
      summary: Handle Stripe webhooks
      description: Process Stripe webhook events for subscription updates
      operationId: post_StripeWebhook
      parameters:
        - schema:
            type: string
            description: Stripe webhook signature
          required: true
          description: Stripe webhook signature
          name: stripe-signature
          in: header
      requestBody:
        content:
          application/json:
            schema: {}
      responses:
        '200':
          description: Webhook processed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  received:
                    type: boolean
                required:
                  - received
        '400':
          description: Invalid webhook signature
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
  /auth/oauth/google:
    get:
      tags:
        - Authentication
      summary: Initiate Google OAuth login
      description: Redirects user to Google OAuth consent screen
      operationId: get_AuthOAuthGoogleStart
      parameters:
        - schema:
            type: string
            description: URL to redirect to after successful login
          required: false
          description: URL to redirect to after successful login
          name: redirect_to
          in: query
      responses:
        '302':
          description: Redirect to Google OAuth
          headers:
            Location:
              schema:
                type: string
              required: true
        '500':
          description: OAuth not configured
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
                  - detail
  /auth/oauth/google/callback:
    get:
      tags:
        - Authentication
      summary: Handle Google OAuth callback
      description: Processes the OAuth response from Google and creates or logs in the user
      operationId: get_AuthOAuthGoogleCallback
      parameters:
        - schema:
            type: string
            description: Authorization code from Google
          required: true
          description: Authorization code from Google
          name: code
          in: query
        - schema:
            type: string
            description: State parameter for CSRF protection
          required: true
          description: State parameter for CSRF protection
          name: state
          in: query
        - schema:
            type: string
            description: Error code if OAuth failed
          required: false
          description: Error code if OAuth failed
          name: error
          in: query
      responses:
        '302':
          description: Redirect to frontend with session token or error
          headers:
            Location:
              schema:
                type: string
              required: true
        '400':
          description: Invalid OAuth response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  detail:
                    type: string
                required:
                  - error
                  - detail
webhooks: {}
