Skip to main content
POST
Query Agent
Queries a registered AI agent via the Nevermined Proxy or directly, using a valid payment plan and signature-based access token. This method allows subscribers to send input to an agent’s endpoint while securely redeeming credits in the background.

Example Usage

Parameters

  • planId: The ID of the payment plan the subscriber has purchased
  • agentId: The ID of the agent being queried
  • accessCredentials: Auth credentials object containing:
    • accessToken: JWT token for authentication
    • neverminedProxyUri: Proxy URI for requests
  • payload: Request payload, typically includes a prompt or other structured input

Response

The access credentials object structure:

Notes

  • Nevermined will automatically:
    • Validate the subscriber’s plan and credits
    • Send the request to the agent’s registered endpoint
    • Redeem the appropriate number of credits (defined by the plan)
  • Fails with a 402 if the subscriber is unauthorized

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agentId
string
required

The unique identifier of the agent to query

Body

application/json

Query payload

prompt
string

Response

Query successful

The response is of type object.