---
title: "End-to-end deploy from one prompt (generate → train → deploy), streaming"
method: POST
path: "/api/v1/one_shot"
tags: ["AI agents"]
---

# End-to-end deploy from one prompt (generate → train → deploy), streaming

`POST /api/v1/one_shot`

## Request

- Base URL: `https://api.quantifyme.ai`
- URL: `https://api.quantifyme.ai/api/v1/one_shot`
- Auth: API key in header `X-API-Key`

## Request body

- OneShotRequest
  - `api_key` string: Your API key, if you cannot set the X-API-Key header. Agents that mint a key at runtime (e.g. a ChatGPT Action calling POST /api/v1/key/trial) should pass the returned `api_key` here on every subsequent call. The X-API-Key header wins when both are present.
  - `aux_feeds` object[]: Extra (symbol, timeframe) feeds merged into the strategy's features as aux_* columns. Max 3; must differ from the primary.
    - `symbol` 'EURUSD' | 'GBPUSD' | 'USDJPY' | 'USDCHF' | 'AUDUSD' | 'NZDUSD' | 'USDCAD' | 'BTCUSD'
    - `timeframe` '1min' | '5min' | '15min' | '1h'
  - `community_id` integer: Deploy an existing community strategy by id instead of generating. See GET /api/v1/community.json.
  - `deliver_to` object: Channels to wire on deploy. Keys: webhook (bool|url), telegram (chat_id).
  - `entry_token` string: Your integration's entry token. ALWAYS send this if you have one, even when you also send api_key. It is what lets this call succeed when the key is not ready yet - agents that issue tool calls in parallel can reach this endpoint before their own createTrialKey call has returned. With a valid entry_token the deploy proceeds under a fresh anonymous identity instead of failing with 401.
  - `preset` string: Deploy a curated template instead of generating. See GET /api/v1/presets.
  - `prompt` string, required
  - `symbol` string: FX pair or BTCUSD. Defaults to EURUSD.
  - `timeframe` '1min' | '5min' | '15min' | '1h'

## Response `200`

SSE stream of token/step/done/error events. Terminal `event: done` carries `{live_url, model, stem, channels}`. Requires a client that can hold an open text/event-stream for ~1-2 minutes. **Callers that cannot consume SSE (ChatGPT Actions, most HTTP tool-callers) must use POST /api/v1/one_shot/start + GET /api/v1/one_shot/status instead.** — Server-Sent Events stream. Each message is `event: <type>\ndata: <json>\n\n`.

## Other responses

- `400`: Bad request
- `401`: Invalid or missing API key
- `429`: Rate limit exceeded, or insufficient credits (body carries credits_remaining and credits_required)

---

[API](https://skmtc.dev/quantifyme/apis/quantifyme-api.md) · [All operations](https://skmtc.dev/quantifyme/apis/quantifyme-api/llms.txt) · [OpenAPI document](https://skmtc.dev/quantifyme/apis/quantifyme-api/revisions/089d1cee1ec5?raw)
