Developer guide for prompt imports

Import many missions with JSONL.

The import flow is built for bulk creation: each JSON object becomes one mission. JSONL is the recommended format, but a JSON array is also accepted for convenience when you export from tooling or build your own generator.

One object per mission Supports bulk import Works with schedules and rules
JSONL preferred
Required fields prompt Everything else can be inferred or defaulted.
Best format JSONL One mission per line makes bulk import and validation easy.
Accepted fallback JSON array Useful when you already have a structured list of missions.
Default behavior Active mission Imported missions are created as active and scheduled from the data you provide.

Recommended import format

Use JSONL for the cleanest bulk import experience. Each line is one mission definition.

JSONL example
{"name":"Daily blog idea","prompt":"Generate a blog post about AI productivity tools.","model":"gpt-4o","output_type":"markdown","schedule_type":"daily","time_of_day":"09:00","timezone":"Europe/Zagreb","rules":[{"type":"daily_limit","value":2}]}
{"name":"Weekly summary","prompt":"Summarize this week's updates into bullets.","model":"gpt-4.1-mini","output_type":"text","schedule_type":"weekly","time_of_day":"08:30","timezone":"Europe/Zagreb","rules":[{"type":"only_days","days":["Monday","Wednesday","Friday"]}]}
{"name":"Product intro video","prompt":"Create a 30-second product intro video with a confident, friendly presenter.","model":"heygen-video-agent","output_type":"video","schedule_type":"once","timezone":"Europe/Zagreb","rules":[]}
JSON array fallback
[
  {
    "name": "Daily blog idea",
    "prompt": "Generate a blog post about AI productivity tools.",
    "model": "gpt-4o",
    "output_type": "markdown",
    "schedule_type": "daily",
    "timezone": "Europe/Zagreb"
  }
]

Field reference

These fields map directly to the Mission model and the scheduling rules used by the app.

Field Type Required Description
prompt string Yes The AI instruction that will be stored on the mission.
name string No Optional display name. If omitted, the app derives one from the prompt.
model string No Defaults to gpt-4o in the import flow.
output_type string No Supports text, markdown, json, image and video.
schedule_type string No Supports once, daily, weekly and custom.
time_of_day HH:MM No Defaults to 01:00 if omitted.
timezone string No Defaults to the user's timezone or app timezone.
rules array No Optional advanced rules like limits, allowed days and budget checks.
description string No Reserved for extra context if you want to enrich the import format later.

Supported models

These are the models currently exposed in the UI and accepted by the mission flow, including the HeyGen video agent.

Mission creator UI

These are the selectable models shown when creating or editing a mission.

  • gpt-5.5Text
  • gpt-5.5-thinkingText
  • gpt-5-miniText
  • gpt-4oText
  • gpt-4.1-miniText
  • gpt-image-1Image
  • heygen-video-agentVideo

Execution notes

Image missions are normalized in the execution layer. gpt-image-2 is accepted there as a fallback, even though it is not exposed in the main creator UI. Video missions are routed through HeyGen and saved as MP4 outputs.

  • gpt-image-1Preferred
  • gpt-image-2Fallback
  • gpt-4.1-miniDefault API key model
  • gpt-5-miniFallback API key model
  • heygen-video-agentVideo agent

For AI agents

Use this block when you want OpenAI or another agent to generate a valid import file from the docs page.

Recommended instructions

Paste this into the prompt you give the model. It keeps the output deterministic and easy to import.

  • Read the schema on this page before generating anything.
  • Return only raw JSONL content, with no markdown fences or explanation.
  • Use one JSON object per line.
  • Always include prompt; other fields may use defaults.
  • Prefer the exact field names documented above.
Copy prompt
Read the MissionQueue developers page and generate a valid JSONL import file.
Output only raw JSONL content.
Do not wrap the result in markdown fences.
Do not add explanations, notes, or commentary.
Use one JSON object per line.
Every object must include prompt.
Use the exact field names documented on the page.
If a field is omitted, rely on the app defaults.

Rules you can include

Rules are optional and should be added only when you need additional scheduling, budget control or mission limits.

Daily limit

{"type":"daily_limit","value":2} limits how many times the mission can run in one day.

Only specific days

{"type":"only_days","days":["Monday","Wednesday"]} keeps the mission active on selected weekdays.

Budget guard

{"type":"budget","operator":"greater than","value":"25"} lets you gate runs by remaining budget.

HeyGen video missions

Use output_type: video with heygen-video-agent when your importer should create prompt-to-video missions.

Video import pattern

Keep the prompt focused on the scene, voice style and duration. MissionQueue will send it to HeyGen, wait for completion and store the resulting MP4 in the user outputs folder.

  • Set output_type to video.
  • Use heygen-video-agent as the model.
  • Set schedule_type to once.
  • Do not include time_of_day; the app uses the user settings time window.
  • Keep rules empty unless you need extra constraints.
Video import example
{"name":"Product intro video","prompt":"Create a 30-second product intro video with a confident, friendly presenter.","model":"heygen-video-agent","output_type":"video","schedule_type":"once","timezone":"Europe/Zagreb","rules":[]}

HeyGen webhook example

When you pass a callback_url to HeyGen, you can receive completion events instead of polling for status.

Webhook events

HeyGen sends success and failure events for video agent runs. For completed videos, the payload includes the generated video id and public download links.

  • video_agent.success means the video finished successfully.
  • video_agent.fail means the generation stopped with an error.
  • Use the session endpoint if you want to reconcile state after a webhook arrives.
Webhook payload example
{
  "event_id": "evt_abc123",
  "event_type": "video_agent.success",
  "event_data": {
    "video_id": "vid_xyz789",
    "url": "https://files.heygen.com/video/vid_xyz789.mp4",
    "video_page_url": "https://app.heygen.com/video-agent/sess_abc123",
    "video_share_page_url": "https://app.heygen.com/share/vid_xyz789",
    "callback_id": null
  },
  "created_at": "2026-07-31T12:05:00Z"
}

Import flow in practice

When a user uploads an import file, MissionQueue reads every object, validates it, creates a mission, then attaches the schedule rules that match the data.

1

Parse JSONL or array

The importer accepts one mission per line or a list of mission objects.

2

Validate each entry

Bad rows are skipped with a warning instead of failing the whole import.

3

Create missions and rules

Each valid row becomes a mission with its scheduling rules and defaults applied.

Frequently asked questions

Quick answers for developers wiring imports from scripts, generators or third-party tools.

Can I import from a script?

Yes. Generate JSONL from any language and upload it. That is the easiest path for automation.

What happens if one row is invalid?

The importer keeps valid rows and reports warnings for invalid ones, so one bad line does not block the entire file.

Is JSONL mandatory?

No. It is the recommended format, but a JSON array is accepted if that is what your export pipeline produces.