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

# Get income analysis

> Get income analysis and distribution.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/yoshi/openapi.documented.yml get /income
openapi: 3.1.0
info:
  title: Yoshi API
  version: 1.0.0
  description: Consumer API for accessing your Yoshi financial data programmatically.
servers:
  - url: https://api.yoshi.ai/v1
    description: Production
  - url: https://staging-api.yoshi.ai/v1
    description: Staging
security:
  - bearerAuth: []
paths:
  /income:
    get:
      tags:
        - Income
      summary: Get income analysis
      description: Get income analysis and distribution.
      operationId: listIncome
      responses:
        '200':
          description: Income data retrieved.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      generated_at:
                        type: string
                      window:
                        type: object
                        properties:
                          start:
                            type: string
                          end:
                            type: string
                          months:
                            type: integer
                        required:
                          - start
                          - end
                          - months
                      monthly_income:
                        type: number
                      variability:
                        type: object
                        properties:
                          min:
                            type: number
                          max:
                            type: number
                          range:
                            type: number
                        required:
                          - min
                          - max
                          - range
                      expenses:
                        type: object
                        properties:
                          amount:
                            type: number
                          percent:
                            type: number
                          breakdown:
                            type: object
                            additionalProperties:
                              type: number
                        required:
                          - amount
                          - percent
                      debt:
                        type: object
                        properties:
                          amount:
                            type: number
                          percent:
                            type: number
                          breakdown:
                            type: object
                            additionalProperties:
                              type: number
                        required:
                          - amount
                          - percent
                      emergency_fund:
                        type: object
                        properties:
                          amount:
                            type: number
                          percent:
                            type: number
                          breakdown:
                            type: object
                            additionalProperties:
                              type: number
                        required:
                          - amount
                          - percent
                      investments:
                        type: object
                        properties:
                          amount:
                            type: number
                          percent:
                            type: number
                          breakdown:
                            type: object
                            additionalProperties:
                              type: number
                        required:
                          - amount
                          - percent
                    required:
                      - generated_at
                      - window
                      - monthly_income
                      - variability
                      - expenses
                      - debt
                      - emergency_fund
                      - investments
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                        example: req_a1b2c3d4-e5f6-7890-abcd-ef1234567890
                      timestamp:
                        type: string
                        format: date-time
                        example: '2026-04-10T12:00:00.000Z'
                    required:
                      - request_id
                      - timestamp
                required:
                  - data
                  - meta
        '404':
          description: No income data available.
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Yoshi from '@yoshi-ai/sdk';

            const client = new Yoshi({
              apiKey: process.env['YOSHI_API_KEY'], // This is the default and can be omitted
            });

            const income = await client.income.retrieve();

            console.log(income.data);
        - lang: Python
          source: |-
            import os
            from yoshi_sdk import Yoshi

            client = Yoshi(
                api_key=os.environ.get("YOSHI_API_KEY"),  # This is the default and can be omitted
            )
            income = client.income.retrieve()
            print(income.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/yoshi-ai-dev/yoshi-go\"\n\t\"github.com/yoshi-ai-dev/yoshi-go/option\"\n)\n\nfunc main() {\n\tclient := yoshi.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tincome, err := client.Income.Get(context.TODO())\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", income.Data)\n}\n"
        - lang: CLI
          source: |-
            yoshi income retrieve \
              --api-key 'My API Key'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Yoshi API key from Settings → API Keys, or a Yoshi OAuth access token
        issued by Sign in with Yoshi.
      x-default: yoshi_test_...

````