Skip to main content

Endpoint

POST https://api.ugc.inc/org/integration-key/upsert

Overview

Create or update an integration key for a specific AI provider. If a key already exists for the provider, it will be updated. Integration keys are used automatically by automation nodes (LLM, image generation, video generation, custom model).

Request Body

provider
string
required
The provider to set the key for. One of: fal, openai, claude, gemini, groq
key
string
required
The API key value for the provider

Response

data
IntegrationKey
The created or updated integration key (with masked value)
curl -X POST https://api.ugc.inc/org/integration-key/upsert \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "openai",
    "key": "sk-proj-abc123..."
  }'
{
  "ok": true,
  "code": 200,
  "message": "Success",
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "provider": "openai",
    "maskedKey": "sk-p...8xYz",
    "created_at": "2024-01-15T10:30:00.000Z"
  }
}