Skip to main content
Deepgram's Docs

Search documentation

Type to search this documentation.

Create an Agent Configuration

POST/v1/projects/{project_id}/agentsCreate an Agent Configuration

Creates a new reusable agent configuration. The config field must be a valid JSON string representing the agent block of a Settings message. The returned agent_id can be passed in place of the full agent object in future Settings messages.

Parameters

project_idstringpathrequired

The unique identifier of the project

Request body

Agent configuration details

application/json
objectCreateAgentConfigurationV1Request

CreateAgentConfigurationV1Request

Request body for creating an agent configuration

api_versioninteger

API version. Defaults to 1

default 1

configstringrequired

A valid JSON string representing the agent block of a Settings message

metadataobject

A map of arbitrary key-value pairs for labeling or organizing the agent configuration

Example request
{
  "api_version": 1,
  "config": "string",
  "metadata": {
    "additionalProp1": "string"
  }
}

Responses

200Agent configuration created successfullyapplication/json
objectCreateAgentConfigurationV1Response

CreateAgentConfigurationV1Response

agent_idstringrequired

The unique identifier of the newly created agent configuration

configobjectrequired

The parsed agent configuration object

metadataobject

Metadata associated with the agent configuration

Example response
{
  "agent_id": "string",
  "config": {},
  "metadata": {
    "additionalProp1": "string"
  }
}
400Invalid Requestapplication/json
valueErrorResponse

ErrorResponse

oneOf · 3 options
Option 1stringErrorResponseTextError

ErrorResponseTextError

Option 2objectErrorResponseLegacyError

ErrorResponseLegacyError

err_codestring

The error code

err_msgstring

The error message

request_idstring

The request ID

Option 3objectErrorResponseModernError

ErrorResponseModernError

categorystring

The category of the error

detailsstring

A description of the error

messagestring

A message about the error

request_idstring

The unique identifier of the request

Example response
{
  "err_code": "string",
  "err_msg": "string",
  "request_id": "string"
}
Documentation menu