Palmier Pro API Endpoints: A Complete Technical Guide to Network Operations
Palmier Pro communicates with exactly four HTTP endpoints—two internal services for sample projects (/v1/samples and /v1/samples/resolve), one streaming endpoint for the Palmier Agent (/v1/agent/stream), and the external Anthropic API (/v1/messages) for LLM-driven editing.
Palmier Pro maintains a deliberately minimal networking surface, performing all project editing and media handling locally while outsourcing specific functions to a handful of HTTP services. According to the palmier-io/palmier-pro source code, the application defines its Palmier Pro API endpoints in Swift service layers that handle sample project fetching, AI agent streaming, and external language model integration. Understanding these endpoints reveals how the macOS application balances local performance with cloud-based AI capabilities.
Internal Sample Project Endpoints
The SampleProjectService class in Sources/PalmierPro/Project/SampleProjectService.swift manages ready-made project templates through two REST endpoints. Both use a hardcoded base URL of https://samples.palmier.ai/.
Fetching the Sample Catalog
The /v1/samples endpoint accepts GET requests and returns a JSON array of available sample projects that users can open from the Welcome overlay.
let service = SampleProjectService()
let sampleList = try await service.listSamples(onProgress: { _ in })
print(sampleList.map(\.title))
The service constructs the full URL by appending v1/samples to the base using URL.appendingPathComponent, then parses the response into SampleProject structs.
Resolving Sample Bundles
The /v1/samples/resolve endpoint accepts GET requests with a sample slug parameter and returns a downloadable ZIP bundle containing asset files.
let zipURL = try await service.materialize(slug: "quick-cut-demo") { progress in
print("download \(progress*100)%")
}
print("Downloaded bundle at:", zipURL.path)
Palmier Agent Streaming Endpoint
The PalmierClient in Sources/PalmierPro/Agent/Clients/PalmierClient.swift implements bidirectional streaming through the /v1/agent/stream endpoint.
This POST endpoint uses a JSON-L streaming protocol to exchange prompts, tool calls, and AI-generated responses between the app and the Palmier Agent service. Unlike the sample service, this client uses a user-configurable baseURL setting.
let client = PalmierClient(baseURL: URL(string: "https://api.palmier.ai/")!)
let stream = try await client.stream(messages: [.user("Show me a cool transition")])
for try await chunk in stream {
switch chunk {
case .assistant(let text): print("Agent:", text)
case .toolResult(let result): print("Tool:", result)
}
}
The client opens an URLSession stream using bytes(for:request, delegate:) and forwards raw bytes to the AgentService, which handles the JSON-L parsing.
External Anthropic API Integration
For LLM-driven editing features like "Generate Caption" and "Trim Scene", the AnthropicClient in Sources/PalmierPro/Agent/Clients/AnthropicClient.swift calls the external Anthropic API.
Authentication and Request Structure
The client sends POST requests to https://api.anthropic.com/v1/messages with the user's API key in the x-api-key header and a JSON payload containing the model name and message history.
let anthro = AnthropicClient(apiKey: "<your-key>")
let response = try await anthro.send(messages: [.user("Write a subtitle for this scene")])
print(response.content)
This is the only external third-party service the app contacts; all other AI interactions route through the internal Palmier Agent streaming endpoint.
Service Architecture and File Organization
The HTTP layer organizes into three primary service files:
SampleProjectService.swift: Handles sample project catalog and download resolution fromsamples.palmier.aiPalmierClient.swift: Manages streaming connections to the Palmier Agent viaapi.palmier.aiAnthropicClient.swift: Wraps external LLM API calls toapi.anthropic.com
The AgentService.swift file orchestrates request/response flow for the agent streaming endpoint, though the actual HTTP implementation lives in PalmierClient.swift.
Summary
- Palmier Pro uses exactly four HTTP endpoints: two internal sample services, one agent streaming endpoint, and the external Anthropic API
- Sample projects fetch from
https://samples.palmier.ai/using/v1/samplesand/v1/samples/resolve - The Palmier Agent communicates via streaming POST requests to
/v1/agent/streamusing JSON-L protocol overURLSession - Anthropic integration requires user-provided API keys and calls
https://api.anthropic.com/v1/messages - All other operations—including timeline manipulation, project saving, and media handling—execute locally on macOS without network calls
Frequently Asked Questions
Does Palmier Pro require an internet connection to function?
No. According to the palmier-io/palmier-pro source code, all core video editing functionality—including timeline manipulation, project saving, and media handling—runs entirely on the local macOS process. You only need connectivity when fetching sample projects, using the AI agent features, or accessing LLM-driven editing through the Anthropic integration.
How does Palmier Pro handle authentication for the Anthropic API?
The AnthropicClient stores the user's API key in memory and injects it into the x-api-key header for every request to https://api.anthropic.com/v1/messages. The key is never hardcoded in the source; users must provide their own credentials through the application's settings interface before invoking AI-driven editing features.
What streaming protocol does the Palmier Agent use?
The /v1/agent/stream endpoint implements a JSON-L streaming protocol over HTTP POST. The PalmierClient opens a persistent URLSession stream using bytes(for:request, delegate:) and forwards raw bytes to the AgentService, which parses the newline-delimited JSON messages containing assistant responses and tool results.
Can I change the base URL for the Palmier Agent service?
Yes. Unlike the sample project service—which uses the hardcoded https://samples.palmier.ai/ base URL—the PalmierClient accepts a configurable baseURL parameter during initialization. This allows you to point the agent streaming endpoint to custom or regional endpoints by passing a different URL when instantiating the client.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →