Keywords AI Users API

End-user (customer) analytics.

OpenAPI Specification

keywordsai-users-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Keywords AI Datasets Users API
  description: 'Keywords AI is an LLM observability and gateway platform. This specification documents the publicly documented REST surface served from https://api.keywordsai.co/api: the OpenAI-compatible chat completions proxy, the asynchronous request-logging endpoint, prompt and prompt-version management, threads, traces, evaluators, users (customers), datasets, and experiments. All endpoints authenticate with a Bearer API key. (Keywords AI is rebranding to Respan; the keywordsai.co host and API remain active.)'
  termsOfService: https://www.keywordsai.co/terms-of-service
  contact:
    name: Keywords AI Support
    url: https://www.keywordsai.co
    email: team@keywordsai.co
  version: '1.0'
servers:
- url: https://api.keywordsai.co/api
  description: Keywords AI production API base.
security:
- bearerAuth: []
tags:
- name: Users
  description: End-user (customer) analytics.
paths:
  /users/list/:
    post:
      operationId: listUsers
      tags:
      - Users
      summary: List users (customers)
      description: Retrieve end-user (customer) records in your organization with analytics and budget fields. Supports filtering by customer_identifier, name, email, number_of_requests, total_tokens, total_cost, and active_days.
      parameters:
      - name: page
        in: query
        schema:
          type: integer
          default: 1
      - name: page_size
        in: query
        schema:
          type: integer
          default: 50
          maximum: 1000
      - name: environment
        in: query
        schema:
          type: string
          enum:
          - prod
          - test
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListFilter'
      responses:
        '200':
          description: A paginated list of users (customers).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedList'
components:
  schemas:
    ListFilter:
      type: object
      properties:
        filters:
          type: object
          additionalProperties: true
        page:
          type: integer
          default: 1
        page_size:
          type: integer
          default: 50
        sort_by:
          type: string
    PaginatedList:
      type: object
      properties:
        count:
          type: integer
        next:
          type: string
          nullable: true
        previous:
          type: string
          nullable: true
        results:
          type: array
          items:
            type: object
            additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Keywords AI API key supplied as the Authorization Bearer header (Authorization: Bearer <KEYWORDSAI_API_KEY>).'