Skip to main content
The Hey Chocolate API can generate server-rendered MP4 videos and drive After Effects templates with sustainability data for certificates, social sharing, and marketing materials.

MP4 video generation

Impact Certificate Video

mutation {
  renderVisualisation(input: {
    productId: "prod_abc123"
    format: MP4
    template: IMPACT_CERTIFICATE
    parameters: {
      resolution: "1920x1080"
      fps: 30
      duration: 10000
      branding: {
        logo: true
        primaryColor: "#F83B00"
      }
    }
  }) {
    url
    format
    fileSize
    duration
    expiresAt
  }
}

Social Share Video

mutation {
  renderVisualisation(input: {
    productId: "prod_abc123"
    format: MP4
    template: SOCIAL_SHARE_VIDEO
    parameters: {
      resolution: "1080x1080"
      fps: 30
      duration: 15000
      platform: "instagram"
    }
  }) {
    url
    fileSize
    duration
  }
}

After Effects integration

Data-driven rendering

Push sustainability data into After Effects templates for automated video production:
mutation {
  renderVisualisation(input: {
    productId: "prod_abc123"
    format: AFTER_EFFECTS
    template: SOCIAL_SHARE_VIDEO
    parameters: {
      templateId: "ae_tmpl_impact_story"
      dataMapping: {
        productName: "{{product.name}}"
        co2Score: "{{product.impactScore.co2Equivalent}}"
        equivalency: "{{product.impactScore.equivalencies[0].description}}"
        savingsValue: "{{product.impactScore.equivalencies[0].value}}"
      }
    }
  }) {
    renderJobId
    status
    estimatedCompletion
    url
  }
}

Checking render status

Video rendering is asynchronous. Poll for completion or use webhooks:
query {
  renderJob(id: "job_abc123") {
    id
    status
    progress
    url
    error
    completedAt
  }
}
Render statuses:
StatusDescription
QUEUEDWaiting to be processed
RENDERINGCurrently being rendered
COMPLETEDRender finished, URL available
FAILEDRender failed, check error field
Alternatively, subscribe to the render.completed webhook event.

Available templates

TemplateResolutionsDurationDescription
IMPACT_CERTIFICATE1920x108010sAnimated impact certificate
SOCIAL_SHARE_VIDEO1080x1080, 1080x192015sSocial media-ready impact video
PRODUCT_HIGHLIGHT1920x108020sProduct sustainability showcase
YEAR_IN_REVIEW1920x108030sAnnual sustainability summary

Rate limits

Video rendering is resource-intensive. Limits by tier:
TierRenders/dayMax resolutionMax duration
Free101080p15s
Growth5001080p30s
Enterprise5,000+4K60s