Skip to main content
POST
/
ephemeral-agent
Create ephemeral agent
curl --request POST \
  --url https://api.iwy.ai/v1/ephemeral-agent \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "configuration": {
    "llm": {
      "model": "gemini-2.0-flash",
      "provider": "google",
      "system_prompt": "You are a helpful assistant for a product demo",
      "first_message": "Welcome to the demo! How can I help you today?"
    },
    "tts": {
      "provider": "elevenlabs",
      "voice_id": "21m00Tcm4TlvDq8ikWAM"
    },
    "video": {
      "provider": "binary",
      "character_id": "0001"
    }
  }
}
'
{
  "agent": {
    "id": "550e8400-e29b-41d4-a716-446655440099",
    "expires_at": "2025-01-15T10:30:00.000Z",
    "created_at": "2025-01-15T10:20:00.000Z"
  }
}

Authorizations

Authorization
string
header
required

Your iwy Service API Key. Find it at app.iwy.ai/settings.

Include it in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Body

application/json

Request to create a one-time use ephemeral agent

configuration
object
required

Agent configuration (same as regular agents)

ttl_seconds
integer
default:300

Time-to-live in seconds. The agent will expire after this duration.

Required range: 60 <= x <= 86400
Example:

600

metadata
object

Optional metadata for tracking or internal use

Example:
{
"purpose": "product_demo",
"campaign": "summer_2025"
}

Response

Ephemeral agent created successfully

Response containing the created ephemeral agent details

agent
object
required

The created ephemeral agent