Agents

Execute Agent Completion

Changed on

Execute a single agent completion with the specified task. Supports both standard and streaming responses.

post/v1/agent/completions

Request

  • Base URL
    https://api.swarms.world
  • URL
    https://api.swarms.world/v1/agent/completions
  • Auth
    none declared. Required headers: x-api-key

Headers

x-api-keystring required

Request body

taskstring nullable

The task to be completed by the agent.

imgstring nullable

A base64 encoded image for the agent to process. Encode your image file to base64 and pass it here.

imgsstring[] nullable

A list of base64 encoded images for the agent to process. Encode your image files to base64 and pass them here.

tools_enabledstring[] nullable

A list of tools that the agent should use to complete its task.

Response

Successful Response

job_idstring nullable

The unique identifier for the agent completion.

successboolean nullable

Indicates whether the agent completion was successful.

namestring nullable

The name of the agent.

descriptionstring nullable

A description of the agent or completion.

temperaturenumber nullable

The temperature setting used for the agent's response generation.

outputsunknown
usageobject nullable

Usage statistics or metadata for the agent completion.

timestampstring nullable

The timestamp when the agent completion was created.

Changes

    • info

      the request property default value changed from streamable_http to auto

    • info

      the request property default value changed from streamable_http to auto

    • info

      the request property default value changed from streamable_http to auto

    • info

      the request property default value changed from streamable_http to auto

    • info

      added the new None enum value to the request property //