Making Your First API Call
Step-by-step guide to using Narada’s API with practical examples
You should have completed the Installation and Authentication sections before proceeding. If you haven’t, please complete them first.
How Narada’s API Works
Narada has two main API endpoints:
Remote Dispatch
Sends commands to invoke the Narada web agent in your browser. Returns a request ID for tracking.
All prompts must start with /Operator
to invoke the web agent.
Task Status
Checks the status of your request using the request ID - whether it’s pending, successful, or errored.
Demo: Narada API in Action
Watch this demonstration of how to use Narada’s remote dispatch API with screenshots and JSON schema:
This video demonstrates the complete workflow from sending a remote dispatch request with screenshot capture enabled and JSON schema validation, through automatic browser execution, to downloading the resulting screenshot files and checking task status via the API.
How It Works
- Remote Dispatch - You send a prompt request to Narada’s API
- Browser Execution - The browser with your Session ID receives and executes the command
- Status Tracking - Use the returned request ID to check task status
- Results - Get your automation results when the task completes
Remote Dispatch Request
The remote dispatch endpoint is a POST request that requires specific headers and request body structure.
Constructing Your Request
Add Required Headers
Include the API key and content type in your request headers.
See the Authentication section for instructions on obtaining your API key.
Build the Request Body
Create the request body with your prompt and session ID.
Required Fields:
prompt
: Your command starting with/Operator
sessionId
: Your unique browser session identifier
See the Authentication section for instructions on obtaining your Session ID.
Optional Advanced Features
Enhance your request with these optional parameters:
clearChat - Clears the chat history when the request is dispatched. Set to true
to start each request with a fresh chat.
saveScreenshot - Records the agent’s actions for observability
When enabled, you’ll receive a download URL for the trace screenshots. See the Screenshots section for more details.
responseFormat - Specify JSON schema for structured output (example below)
This JSON schema example shows how to structure responses for job search results. To learn how to customize the schema based on your specific data requirements, see the JSON Schema section.
callbackURL - Optional webhook URL for asynchronous responses
For detailed webhook implementation, see the Webhooks section.
Complete Example Requests
What the Remote Dispatch Returns
The remote dispatch endpoint returns a request ID that you can use to track your task’s progress:
Task Status Request
Use the request ID from your remote dispatch call to check the status of your automation task.
Making a Status Request
Use the Request ID
Take the requestId
returned from your remote dispatch request and use it in a GET request to check status.
Include Your API Key
Add your API key to the request headers.
Status Response Types
The task status endpoint will return either:
pending
- Task is still in progresssuccess
- Task completed successfully with resultserror
- Task failed with an error
Congratulations!
You’ve successfully made your first API request and learned how to check task status.
What’s Next?
JSON Schema
Learn how to structure responses with JSON schema validation
Screenshots
Understand how to capture and download agent action traces
Prompt Optimizer
Use Narada’s prompt optimizer to improve your prompts
Webhooks
Set up webhooks for real-time task completion notifications
Polling
Implement polling strategies for checking task status
Python SDK
Use Narada’s Python SDK for streamlined development
API References
For detailed parameter information, see: