Skip to main content
POST
/
agent
JavaScript
import Morphik from 'morphik';

const client = new Morphik({
  apiKey: 'My API Key',
});

const response = await client.agent.executeQuery({ query: 'query' });

console.log(response);
{}

Headers

authorization
string

Body

application/json

Request model for agent queries

query
string
required

Natural language query for the Morphik agent

chat_id
string | null

Optional chat session ID for persisting conversation history

display_mode
enum<string>
default:formatted

Display mode for images: 'formatted' (default) creates bounding boxes with Gemini, 'raw' returns uncropped images

Available options:
formatted,
raw

Response

Successful Response

The response is of type object.

I