Skip to main content
POST
/
query
JavaScript
import Antimetal from '@antimetal/sdk';

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

const queryResponse = await client.query.ask({ question: 'x' });

console.log(queryResponse.conversation_id);
{
  "conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "answer": "<string>",
  "artifacts": [
    {
      "id": "<string>",
      "tool_name": "<string>",
      "data_type": "<string>",
      "provider": "<string>",
      "summary": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key authentication via Bearer token

Headers

Antimetal-Version
string
default:2026-03-17

The API version to use. Defaults to the latest stable version if omitted. Pin to the version string in this document's info.version field to opt into exactly this version's schema.

Example:

"2026-03-17"

Body

application/json
question
string
required

Natural language question to ask the AI agent

Minimum string length: 1
conversation_id
string<uuid>

Conversation ID from a previous query response — pass to continue that conversation

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
stream
boolean

When true, returns a Server-Sent Events stream. Must also send Accept: text/event-stream header.

Response

conversation_id
string<uuid>
required

Pass in subsequent requests to continue this conversation

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
answer
string
required

The AI agent's natural language answer

artifacts
object[]
required

Artifacts (metrics, logs, traces, etc.) the agent found while answering