Docs/API/API

    Quickstart

    Last updated · MAR 2026·Read as Markdown
    Note: API access requires a Builder plan or higher. Free accounts cannot access the API. Upgrade to Builder

    app.avcodex.com > Your agent > Share > Share via API > Copy API key.

    bash
    curl https://app.avcodex.com/api/v1/chat/completions \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "myagent-123",
        "messages": [{"role": "user", "content": "Hello"}]
      }'
    • Endpoint: POST https://app.avcodex.com/api/v1/chat/completions.
    • Model: your agent's ID (format: agentname-123).
    • Auth: Bearer token in the header.
    • Body: OpenAI-compatible format.
    json
    {
      "chatSessionId": "550e8400-e29b-41d4-a716-446655440000",
      "choices": [{
        "message": {
          "role": "assistant",
          "content": "Response text here"
        }
      }]
    }

    Include chatSessionId from the previous response:

    json
    {
      "model": "myagent-123",
      "chatSessionId": "550e8400-e29b-41d4-a716-446655440000",
      "messages": [{"role": "user", "content": "Follow up"}]
    }
    javascript
    import OpenAI from 'openai';
    
    const openai = new OpenAI({
      apiKey: process.env.AVCODEX_API_KEY,
      baseURL: 'https://app.avcodex.com/api/v1'
    });
    
    const response = await openai.chat.completions.create({
      model: 'myagent-123',
      messages: [{ role: 'user', content: 'Hello' }]
    });

    *AVCodex · Your AV expertise. Amplified by AI.*

    Was this helpful?
    Edit this page →