Documentation Index
Fetch the complete documentation index at: https://docs.optexity.com/llms.txt
Use this file to discover all available pages before exploring further.
POST /inference
Submits automation tasks to an Optexity inference server for asynchronous execution.Description
The inference endpoint is the primary way to submit automation tasks to an Optexity inference server. Tasks are enqueued and executed asynchronously in the background. The endpoint supports both local development and cloud production deployments.Authentication
Local endpoint (
http://localhost:9000/inference) does not require authentication and is free
to use for development and testing.Cloud endpoint (
https://api.optexity.com/api/v1/inference) requires authentication with an API
key in the request header. API keys can be found in the Optexity dashboard under the “API Keys”
section. This requires a paid plan. Contact us at founders@optexity.com to get a paid plan.Parameters
Headers
-
Content-Typestringrequired Must be set toapplication/json -
Authorizationstringrequired (cloud endpoint only) API key for authentication. Format:x-api-key YOUR_OPTEXITY_API_KEYNot required for local endpoint
Body Parameters
-
endpoint_namestringrequired Name of the automation endpoint to execute. Must match a recording/automation configured in the Optexity control plane. -
input_parametersdict[str, list[str]]required Input values for the automation. Keys are parameter names, values are lists of strings. Every parameter defined in the automation’sinput_parametersshould be provided here. If a parameter is given an empty list and it is used in aninput textaction, the action will be skipped. -
secure_parametersdict[str, list[SecureParameter]]optional Secure parameters for the automation. Keys are parameter names, values are lists of secure parameters. Every parameter defined in the automation’ssecure_parametersshould be provided here. These are used to securely store sensitive information like passwords, API keys, and other secrets. Please refer to the Secure Parameters API Reference and One Password Integration documentation for more information. -
unique_parameter_nameslist[str]optional Subset of keys frominput_parametersthat uniquely identify this task. Used for deduplication. Every name in this list must exist as a key ininput_parameters.
Code Examples
Example with Secure Parameters
Response
Success Response (202 Accepted)
The task has been enqueued and will execute asynchronously.| Field | Type | Description |
|---|---|---|
success | boolean | Indicates whether the request was successful |
message | string | Status message describing the result |
Error Responses
400 Bad Request
Returned when request parameters are invalid.unique_parameter_namescontains a key that doesn’t exist ininput_parameters- Parameter values are not lists of strings
- Missing required
endpoint_nameorinput_parametersfields
404 Not Found
Returned when the specified endpoint does not exist.endpoint_namedoesn’t match any configured automation- Endpoint has been deleted or is not accessible
401 Unauthorized
Returned when authentication fails (cloud endpoint only).- Missing
Authorizationheader - Invalid API key format
- Expired or revoked API key
500 Internal Server Error
Returned when an unexpected server error occurs.- Network connectivity issues with the control plane
- Control plane service unavailable
- Internal server configuration errors
How It Works
- The inference server receives the
InferenceRequest - It forwards the request to the Optexity control plane at
api.optexity.com - The control plane returns a serialized
Taskobject containing the full workflow - The task is enqueued locally for background execution
- A
202 Acceptedresponse is returned immediately - The browser automation executes asynchronously
Validation
The endpoint validates:- All
unique_parameter_namesexist ininput_parameters - All parameter values are lists of strings
- The
endpoint_namematches a valid automation
Configuration
The endpoint uses these settings from environment variables:| Setting | Default | Description |
|---|---|---|
OPTEXITY_API_KEY | Required | API key for control plane authentication |
INFERENCE_ENDPOINT | api/v1/inference | Control plane endpoint path |
Task Object Structure
Task Object Structure
The control plane returns a
Task object with this structure:Related
- Health Endpoints - Monitor task status
- Getting Started Guide - Server setup
- Automation Schema - Task definition