---
title: OpenAI Live | RunAPI
description: Send a request through RunAPI's OpenAI-compatible Live operation.
url: https://runapi.ai/fr/docs/api/openai/live.md
canonical: https://runapi.ai/fr/docs/api/openai/live
locale: fr
---

> Version HTML: https://runapi.ai/fr/docs/api/openai/live
> Index du site pour les agents: https://runapi.ai/llms.txt

# OpenAI Live

## Vue d'ensemble

Use RunAPI's OpenAI-compatible Live operation with a compatible model and the protocol's request and response shapes.

### Démarrage rapide

1. Créez une clé API et définissez-la comme RUNAPI_API_KEY.
2. Choisissez un modèle compatible, puis envoyez les paramètres de chemin et le corps JSON documentés.
3. Lisez la réponse JSON ou les événements envoyés par le serveur affichés pour cette opération, et gérez les erreurs de protocole.

## Point de terminaison

POST /v1/live/webrtc

URL de base: https://runapi.ai

Version du contrat: v1

Authentification recommandée: Authorization: Bearer YOUR_API_TOKEN

## Supports d'authentification

RunAPI accepte chaque protocole listé ci-dessous. Les exemples générés utilisent l'en-tête préféré du protocole.

- `Authorization: Bearer YOUR_API_TOKEN` (Recommandé)
- `x-api-key: YOUR_API_TOKEN`

## Modèles compatibles

Ouvrez une page de modèle pour consulter la tarification actuelle, les limites de débit et les conditions d'utilisation commerciale.

- [gpt-live-1](https://runapi.ai/fr/models/gpt)

## Contrat de requête

Seuls les champs disposant à la fois d'un protocole public et d'une prise en charge RunAPI avérée sont listés. Les champs supplémentaires du corps JSON sont transmis tels quels.

### Corps JSON

Requis: `model`, `transport`, `sdp`

```json
{
  "delegation": {
    "additionalProperties": true,
    "description": "Optional client or Responses delegation contract.",
    "properties": {
      "instructions": {
        "description": "Backend prompt for delegated work when type is responses.",
        "type": "string"
      },
      "max_output_tokens": {
        "description": "Output token budget for the delegated response.",
        "type": "integer"
      },
      "model": {
        "description": "Responses model that runs delegated work when type is responses.",
        "minLength": 1,
        "type": "string"
      },
      "parallel_tool_calls": {
        "description": "Allow independent delegated tool calls in one turn.",
        "type": "boolean"
      },
      "reasoning": {
        "additionalProperties": true,
        "description": "Reasoning settings for the delegated model.",
        "type": "object"
      },
      "service_tier": {
        "description": "Service tier requested for the delegated response.",
        "type": "string"
      },
      "text": {
        "additionalProperties": true,
        "description": "Text output settings for the delegated response.",
        "type": "object"
      },
      "tool_choice": {
        "description": "Which delegated tools the backend may use.",
        "type": [
          "string",
          "object"
        ]
      },
      "tools": {
        "description": "Hosted Responses tools, or client-owned function tools when type is client.",
        "items": {
          "additionalProperties": true,
          "properties": {
            "type": {
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        },
        "minItems": 1,
        "type": "array"
      },
      "type": {
        "enum": [
          "client",
          "responses"
        ],
        "type": "string"
      }
    },
    "type": [
      "object",
      "null"
    ]
  },
  "model": {
    "description": "RunAPI model identifier; Live currently supports gpt-live-1.",
    "type": "string"
  },
  "sdp": {
    "description": "Client SDP offer for the WebRTC session.",
    "minLength": 1,
    "type": "string"
  },
  "transport": {
    "const": "webrtc",
    "description": "WebRTC session negotiation transport.",
    "type": "string"
  }
}
```

### Exemple de requête

```json
{
  "delegation": {
    "model": "gpt-5.6-terra",
    "tools": [
      {
        "type": "web_search_preview"
      }
    ],
    "type": "responses"
  },
  "model": "gpt-live-1",
  "sdp": "v=0",
  "transport": "webrtc"
}
```

## Réponse synchrone

HTTP 201

### Schéma

```json
{
  "additionalProperties": true,
  "properties": {
    "session": {
      "additionalProperties": true,
      "type": "object"
    },
    "transport": {
      "additionalProperties": true,
      "type": "object"
    }
  },
  "required": [
    "session",
    "transport"
  ],
  "type": "object"
}
```

### Exemple

```json
{
  "session": {
    "id": "live_123"
  },
  "transport": {
    "sdp": "answer",
    "type": "webrtc"
  }
}
```

## Erreur de protocole : invalid_request

HTTP 400

### Schéma

```json
{
  "additionalProperties": true,
  "properties": {
    "error": {
      "additionalProperties": true,
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "type": "string"
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "message",
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "error"
  ],
  "type": "object"
}
```

### Exemple

```json
{
  "error": {
    "code": null,
    "message": "Invalid Live session request",
    "param": "sdp",
    "type": "invalid_request_error"
  }
}
```

## Utilisation

### Schéma

```json
{
  "additionalProperties": true,
  "properties": {
    "duration_seconds": {
      "type": "number"
    }
  },
  "required": [
    "duration_seconds"
  ],
  "type": "object"
}
```

### Exemple

```json
{
  "duration_seconds": 3
}
```

## Exemples de code générés

Chaque exemple cURL, JavaScript et Python envoie la requête validée depuis ce contrat sans nécessiter de SDK spécifique au protocole.

### curl

```curl
curl -X POST https://runapi.ai/v1/live/webrtc \
  -H Authorization:\ Bearer\ YOUR_API_TOKEN \
  -H Content-Type:\ application/json \
  -d \{\"model\":\"gpt-live-1\",\"transport\":\"webrtc\",\"sdp\":\"v\=0\",\"delegation\":\{\"type\":\"responses\",\"model\":\"gpt-5.6-terra\",\"tools\":\[\{\"type\":\"web_search_preview\"\}\]\}\}
```

### javascript

```javascript
const response = await fetch("https://runapi.ai/v1/live/webrtc", {
  method: "POST",
  headers: {
  "Authorization": "Bearer YOUR_API_TOKEN",
  "Content-Type": "application/json"
},
  body: JSON.stringify({
  "model": "gpt-live-1",
  "transport": "webrtc",
  "sdp": "v=0",
  "delegation": {
    "type": "responses",
    "model": "gpt-5.6-terra",
    "tools": [
      {
        "type": "web_search_preview"
      }
    ]
  }
})
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();
console.log(data);
```

### python

#### Installer

```bash
pip install requests
```

```python
import requests

response = requests.post(
    "https://runapi.ai/v1/live/webrtc",
    headers={"Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json"},
    json={"model": "gpt-live-1", "transport": "webrtc", "sdp": "v=0", "delegation": {"type": "responses", "model": "gpt-5.6-terra", "tools": [{"type": "web_search_preview"}]}}
)
response.raise_for_status()
print(response.json())
```

## Guides associés

- [Authentification](https://runapi.ai/fr/docs/guides/authentication.md)
- [Démarrage rapide](https://runapi.ai/fr/docs/guides/llm-api/quickstart.md)

---

## Plus de ressources de RunAPI

- [Accueil](https://runapi.ai/fr/.md)
- [Catalogue de modèles](https://runapi.ai/fr/models.md)
- [Tarifs](https://runapi.ai/fr/pricing.md)
- [Fournisseurs](https://runapi.ai/fr/models)
- [Documentation](https://runapi.ai/fr/docs/guides)
- [SDK](https://runapi.ai/fr/sdk.md)
- [CLI](https://runapi.ai/fr/cli.md)
- [Serveur MCP](https://runapi.ai/fr/mcp.md)
- [Claude Code vs Cursor](https://runapi.ai/fr/claude-code-vs-cursor.md)
- [Configuration de l’API Cursor](https://runapi.ai/fr/cursor-api-setup.md)
- [RunAPI vs OpenRouter](https://runapi.ai/fr/openrouter-alternative.md)
- [Entreprise](https://runapi.ai/fr/contact.md)
- [Contact](https://runapi.ai/fr/contact.md)
- [Conditions](https://runapi.ai/fr/terms.md)
- [Confidentialité](https://runapi.ai/fr/privacy.md)
- [Index du site pour les agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Données structurées

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "fr",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/fr",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/fr/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "fr",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/fr",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/fricon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "fr",
    "@type": "TechArticle",
    "headline": "OpenAI Live",
    "description": "Send a request through RunAPI's OpenAI-compatible Live operation.",
    "url": "https://runapi.ai/fr/docs/api/openai/live",
    "mainEntityOfPage": "https://runapi.ai/fr/docs/api/openai/live"
  }
]
```
