POST
/
v1
/
agent
/
create
!pip install vlmrun

from vlmrun.client import VLMRun
from vlmrun.client.types import AgentCreationResponse, AgentCreationConfig

# Initialize the client
client = VLMRun(base_url="https://agent.vlm.run/v1", api_key="<VLMRUN_API_KEY>")

# Create the agent using a prompt
response: AgentCreationResponse = client.agent.create(
  config=AgentCreationConfig(prompt="Extract the invoice_id, date and amount from the invoice."),
)
{
  "id": "<string>",
  "name": "<string>",
  "status": "pending",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}
!pip install vlmrun

from vlmrun.client import VLMRun
from vlmrun.client.types import AgentCreationResponse, AgentCreationConfig

# Initialize the client
client = VLMRun(base_url="https://agent.vlm.run/v1", api_key="<VLMRUN_API_KEY>")

# Create the agent using a prompt
response: AgentCreationResponse = client.agent.create(
  config=AgentCreationConfig(prompt="Extract the invoice_id, date and amount from the invoice."),
)

Authorizations

Authorization
string
header
required

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

Body

application/json

Request to create an agent.

config
object

The configuration for the agent creation request.

id
string

Unique identifier of the request.

created_at
string<date-time>

Date and time when the request was created (in UTC timezone)

callback_url
string<uri> | null

The URL to call when the request is completed.

Minimum length: 1
name
string | null

Name of the agent. If not provided, a pretty-name will be generated.

inputs
object | null

The inputs to the agent.

Response

Successful Response

Response to the agent creation request.

id
string
required

ID of the agent

name
string
required

Name of the agent

created_at
string<date-time>
required

Date and time when the agent was created (in UTC timezone)

updated_at
string<date-time>
required

Date and time when the agent was updated (in UTC timezone)

status
enum<string>
default:pending

The status of the job.

Available options:
pending,
enqueued,
running,
completed,
failed,
paused