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

# Get agent info, balance and limits



## OpenAPI

````yaml get /api/agent/me
openapi: 3.1.0
info:
  title: Citedy Agent API
  version: 1.0.0
  description: >-
    Public contract for Citedy agent integrations. This contract reflects the
    current /api/agent surface without changing runtime behavior.
  contact:
    name: Citedy Support
    url: https://www.citedy.com
  license:
    name: Proprietary
    url: https://www.citedy.com
servers:
  - url: https://www.citedy.com
security: []
tags:
  - name: Health
    description: Platform and dependency health
  - name: Registration
    description: Agent onboarding and approval
  - name: Agent
    description: Agent identity and key lifecycle
  - name: Scout
    description: Trend scouting endpoints
  - name: Gaps
    description: Content gap analysis
  - name: Autopilot
    description: Article generation and retrieval
  - name: Articles
    description: Queued article generation job polling
  - name: Adaptations
    description: Social adaptation generation
  - name: Sessions
    description: Autopilot recurring sessions
  - name: Lead Magnets
    description: Lead magnet generation and state
  - name: Warm Leads
    description: Warm-lead report generation and export
  - name: Ingest
    description: Content ingestion jobs
  - name: Competitors
    description: Competitor discovery and analysis
  - name: Personas
    description: Writing persona catalog
  - name: Webhooks
    description: Webhook endpoint registration and delivery logs
  - name: Publishing
    description: Social publishing, scheduling and cancellation
  - name: Schedule
    description: Content schedule timeline and gap analysis
  - name: Settings
    description: Agent preferences and configuration
  - name: Scan
    description: Experimental trend scanning (xAI Grok)
  - name: Status
    description: Operational readiness and actionable onboarding status
  - name: Products
    description: Product knowledge base document management
  - name: Shorts
    description: Short-form video generation and polling
  - name: SEO Tools
    description: Agent-authenticated SEO diagnostics tools exposed via MCP seo.* namespace.
  - name: GSC
    description: Google Search Console integration and reporting
paths:
  /api/agent/me:
    get:
      tags:
        - Agent
      summary: Get agent info, balance and limits
      operationId: getAgentContext
      responses:
        '200':
          description: Agent context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentMeResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - AgentApiKey: []
components:
  schemas:
    AgentMeResponse:
      type: object
      properties:
        agent_id:
          type: string
          format: uuid
        agent_name:
          type: string
        status:
          type: string
        api_key_prefix:
          type: string
        last_activity_at:
          type:
            - string
            - 'null'
          format: date-time
        total_credits_used:
          type: number
        created_at:
          type: string
          format: date-time
        blog_url:
          type:
            - string
            - 'null'
          format: uri
        tenant_balance:
          type: object
          properties:
            credits:
              type: number
            status:
              type: string
              enum:
                - healthy
                - low
                - empty
          required:
            - credits
            - status
        rate_limits:
          type: object
          additionalProperties:
            type: object
            properties:
              remaining:
                type: integer
              resetAt:
                type: string
                format: date-time
            required:
              - remaining
              - resetAt
        referral:
          type:
            - object
            - 'null'
          properties:
            code:
              type: string
            url:
              type: string
              format: uri
          required:
            - code
            - url
        connected_platforms:
          type: array
          items:
            type: object
            properties:
              id:
                type:
                  - string
                  - 'null'
                format: uuid
                description: Social account UUID — use as accountId when publishing
              platform:
                type: string
              connected:
                type: boolean
              account_name:
                type:
                  - string
                  - 'null'
            required:
              - id
              - platform
              - connected
              - account_name
        stats_url:
          type:
            - string
            - 'null'
          format: uri
      required:
        - agent_id
        - agent_name
        - status
        - api_key_prefix
        - total_credits_used
        - created_at
        - tenant_balance
        - rate_limits
        - connected_platforms
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
      required:
        - error
      additionalProperties: true
    RateLimitErrorResponse:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          properties:
            retry_after:
              type: integer
          required:
            - retry_after
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitErrorResponse'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    AgentApiKey:
      type: http
      scheme: bearer
      description: Bearer citedy_agent_* key

````