openapi: 3.2.0 info: title: Latitude Usage API version: v1 description: Open-source AI agent monitoring platform. Full observability into what's failing in production. Discover underlying issues, get alerts when something breaks and verify your fix worked. servers: - url: https://api.latitude.so description: Production servers: - url: https://api.latitude.so tags: - name: Usage paths: /v1/usage: get: tags: - Usage x-fern-sdk-group-name: usage x-fern-sdk-method-name: get summary: Get usage description: Returns the organization's credit usage for the current billing period, broken down by product area and by project. security: - ApiKeyAuth: [] operationId: getUsage responses: '200': description: Current period usage content: application/json: schema: $ref: '#/components/schemas/UsageResponse' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: UsageCategory: type: object properties: category: type: string enum: - traces - flaggers - signals - behaviors - annotations - other description: Product area the credits were spent on. credits: type: integer description: Credits spent in this category during the period. required: - category - credits UsageProject: type: object properties: id: type: string description: Stable project identifier. slug: type: string nullable: true description: Project slug. `null` when the project no longer exists. name: type: string nullable: true description: Project name. `null` when the project no longer exists. credits: type: integer description: Credits the project spent during the period. categories: type: array items: $ref: '#/components/schemas/UsageCategory' description: The project's credits by product area, largest first. required: - id - slug - name - credits - categories UsageResponse: type: object properties: plan: type: string enum: - free - pro - enterprise - self-hosted description: Billing plan the organization is on. period: type: object properties: start: type: string description: ISO-8601 start of the current billing period. end: type: string description: ISO-8601 end of the current billing period, exclusive. required: - start - end description: Billing period the usage figures cover. credits: type: object properties: included: type: integer nullable: true description: Credits included in the plan for the period. `null` when the plan is unlimited. consumed: type: integer description: Credits used so far this period, overage included. remaining: type: integer nullable: true description: Included credits still available. `null` when the plan is unlimited. overage: type: integer description: Credits used beyond the included allowance. required: - included - consumed - remaining - overage description: Credit position for the period. categories: type: array items: $ref: '#/components/schemas/UsageCategory' description: Credits by product area across all projects, largest first. projects: type: array items: $ref: '#/components/schemas/UsageProject' description: Credits by project, largest first. required: - plan - period - credits - categories - projects Error: type: object properties: error: type: string required: - error securitySchemes: ApiKeyAuth: type: http scheme: bearer bearerFormat: API key description: 'Organization-scoped API key, sent as `Authorization: Bearer `.' x-fern-bearer: name: apiKey env: LATITUDE_API_KEY