Skip to main content
Build a repeatable end-of-day report for the AI-industry stocks you track. Each run produces a one-page PDF with today’s prices, the day’s moves, and the news that moved them — all rendered in your own house style. The recipe uses two skills:
  • Built-in office — the umbrella that lets the model pick the right document format (PDF, in this case).
  • Inline design-system — a request-scoped skill that carries your colors, fonts, and layout rules.
See Skills for the full request schema and runtime behavior.

Prerequisites

Install one SDK:
  • Python: pip install perplexityai
  • TypeScript: npm install @perplexity-ai/perplexity_ai
If you do not have an API key yet:

Get your Perplexity API Key

Navigate to the API Keys tab in the API Portal and generate a new key.
Export your API key:

Define the design skill

The inline design-system skill tells the model how the report should look. Its description is the routing trigger — one line telling the model when to load it. The instructions carry the full design book. Keep the design book short and directive. The model reads it once, per request, and applies it while generating the document.

Generate today’s report

Combine the office umbrella with the inline design-system skill. The prompt names the tickers and asks for today’s move plus dated news tagged to the ticker each item moved. Skills run on the durable backend, so submit with background: true and poll GET /v1/agent/{id} until the status is terminal.

What the response contains

The completed response’s output includes:
  • One skill_loaded item for design-system and one for the built-in office/pdf leaf the model loaded from the umbrella.
  • A share_file item pointing to the generated PDF. Download it with the response files endpoints, as shown in Working with files.

Run it every trading day

Turn the snippet into a scheduled job (cron, Airflow, GitHub Actions) that runs after the US market closes. The design skill lives in your code, so the report stays visually consistent every day while the content updates itself.

Next steps

Skills

Full reference for the skills field, the built-in catalog, and inline skills.

Working with Files

List and download files an Agent API response produced in the sandbox.

Background Mode

Submit, poll, stream, and cancel long-running agent runs.