ThrustLab Geometry API
The geometry API from ThrustLab — 5 operation(s) for geometry.
The geometry API from ThrustLab — 5 operation(s) for geometry.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/thrustlab-com:thrustlab-com-geometry-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
description: Electric UAV powertrain simulation platform
title: ThrustLab Geometry API
version: v1-beta
servers:
- description: Production
url: https://thrustlab.com
security:
- HTTPBearer: []
tags:
- name: geometry
paths:
/v1/geometry/analyze:
post:
description: 'Aero-only operating-point analysis (point / sweep / solve-to-target).
Wraps the analyze service on the editor''s live working geometry.
AERO-ONLY — there is NO motor/battery/ESC field anywhere; the strict
``extra="forbid"`` serializer is the guard. SYNCHRONOUS on the warm JIT
cache — a plain 200 with the result, never a 202/job id. STATELESS:
the editor''s inline arrays carry everything, so this touches NO DB and reads
no current user (no saved-component path -> no IDOR surface).
A genuine build/solve failure (degenerate geometry, bad target) rewraps
``ValueError -> 422`` with a user-safe message and no traceback (mirrors the process_image idiom). A NON-converged solve-to-target is NOT an
error: it returns a normal 200 with ``converged: false`` + a ``reason``.'
operationId: analyze_geometry_v1_geometry_analyze_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AnalyzeGeometryRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AnalyzeGeometryResponse'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Analyze Geometry
tags:
- geometry
/v1/geometry/design:
post:
description: 'Generate an optimal MIL starting blade from design targets; returns 202 + id.
Dispatches the two-stage MIL design (Betz seed -> L-BFGS efficiency polish,) to the concurrency=1 Celery worker. Stream
progress at ``GET /v1/geometry/design/{id}/stream``. Creating a blade is FREE —
this runs OUTSIDE the credits ledger. The owner is stamped into the Redis
payload at dispatch (IDOR) and the job id starts with ``geom_``.'
operationId: design_geometry_v1_geometry_design_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DesignRequest'
required: true
responses:
'202':
content:
application/json:
schema:
$ref: '#/components/schemas/CalibrateAcceptedResponse'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Design Geometry
tags:
- geometry
/v1/geometry/design/{job_id}/stream:
get:
description: 'SSE relay for a design job''s progress (ownership-guarded).
Clone of ``stream_calibration``: text/event-stream, Cache-Control no-cache,
X-Accel-Buffering no; OWNERSHIP FIRST — a foreign or missing
job id returns 404 resource_missing (no enumeration signal). Then subscribe
f"design_events:{id}", emit an initial ``queued`` snapshot, keepalive ~30s,
unwrap the worker''s {"object": {...}} envelope, break on terminal status,
finally unsubscribe + aclose. Distinct ``design.updated`` SSE event name
so a stale calibration client cannot read design frames.'
operationId: stream_design_v1_geometry_design__job_id__stream_get
parameters:
- in: path
name: job_id
required: true
schema:
title: Job Id
type: string
responses:
'200':
content:
application/json:
schema: {}
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Stream Design
tags:
- geometry
/v1/geometry/export:
post:
description: 'Export the caller''s OWN working/saved geometry to STEP / IGES / STL bytes.
GATED: CAD export requires the ``cad_export`` capability
(Pro) AND exports OWN-CUSTOM geometry only. The capability gate runs
FIRST (before any geometry is resolved) so a non-Pro user gets a legible 402
``upgrade_required`` rather than a 404. A CATALOG (public) ``component_id`` is
NEVER the export source — only the caller''s OWN custom prop or their inline
working geometry. The curated propeller geometry moat thus reaches CAD
bytes, not just component specs.
SYNC binary download: lofts the geometry into a watertight N-blade solid in
an isolated one-shot subprocess and returns the bytes with a
``Content-Disposition: attachment`` header + the CAD MIME per format. NO
``response_model`` (raw bytes; mirrors export.csv).
Two input paths (exactly one, enforced by the serializer):
* inline ``section_coords`` + chord/twist/radius — the primary path; the editor
already holds these from ``/v1/geometry/generate`` (the user''s OWN design, no
DB read — allowed for a cad_export-capable user).
* ``component_id`` — re-derives the section_coords from the saved ``spec_json``
via the deterministic generator, resolved to the caller''s OWN CUSTOM
prop only (a catalog/public id -> the same 404 as a foreign-private id;, anti-enumeration).
A loft that cannot close to a valid solid -> 422 ``geometry_not_loftable``
(CadExportError, never a 500). The filename is sanitized.'
operationId: export_geometry_v1_geometry_export_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExportGeometryRequest'
required: true
responses:
'200':
content:
application/json:
schema: {}
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Export Geometry
tags:
- geometry
/v1/geometry/generate:
post:
description: 'Generate full propeller geometry from explicit spline definitions.
Use this for custom designs that aren''t in the catalog.
Body fields: diameter, pitch, num_blades, chord_spline, thickness_spline,
thickness_scale, airfoil, and the optional editor-intent DOFs
twist_spline (explicit twist B-spline; absent => pitch-derived twist) and
airfoil_layout (per-station airfoil breakpoints; absent => single airfoil).
Returns a geometry resource with the preview array fields (radius, chord,
twist, thickness, hub_radius, section_airfoils) PLUS loft-ready
section_coords (cosine-sampled per station) for the 3D viewer / CAD export.
Stateless compute; the DB is touched ONLY to resolve caller-owned ``afl_``
custom airfoils referenced in airfoil_layout (caller-scoped).
An unknown airfoil name or an unfittable layout -> 422 unknown_airfoil.'
operationId: generate_geometry_v1_geometry_generate_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/GenerateGeometryRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/GeometryResponse'
description: Successful Response
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
description: Validation Error
summary: Generate Geometry
tags:
- geometry
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
title: Detail
type: array
title: HTTPValidationError
type: object
SplineData:
properties:
control_points:
items:
type: number
title: Control Points
type: array
degree:
default: 3
maximum: 5.0
minimum: 1.0
title: Degree
type: integer
knots:
items:
type: number
title: Knots
type: array
required:
- knots
- control_points
title: SplineData
type: object
DesignRequest:
additionalProperties: false
description: 'Generate an optimal MIL starting blade from design targets.
Strict (``extra="forbid"``) with numeric bounds on every field. The fields are the Generate-form inputs: blade count, diameter
(-> tip radius), hub radius, design RPM (-> Omega), design airspeed (``0`` =
static — the kernel is static-valid), a thrust *or* power target, and the
per-station airfoil layout. The server computes the optimum design-Cl
distribution itself (the constant Cl that maximizes blade efficiency). There
are NO polar coefficients (hard contract) — the geometry + Re/M
determine the section physics via NeuralFoil.'
properties:
air_density:
default: 1.225
description: Air density kg/m^3
exclusiveMinimum: 0.0
maximum: 5.0
title: Air Density
type: number
airfoil:
default: naca4412
maxLength: 64
title: Airfoil
type: string
airfoil_layout:
anyOf:
- items:
$ref: '#/components/schemas/AirfoilBreakpoint'
maxItems: 64
type: array
- type: 'null'
description: Per-station airfoil breakpoints. Only the rootmost entry is used — a MIL design flies one section for the whole blade.
title: Airfoil Layout
airspeed:
default: 0.0
description: Design airspeed m/s; 0 = static
maximum: 343.0
minimum: 0.0
title: Airspeed
type: number
design_rpm:
description: Design RPM (-> Omega)
exclusiveMinimum: 0.0
maximum: 200000.0
title: Design Rpm
type: number
diameter:
description: Diameter in inches (-> tip radius R)
exclusiveMinimum: 0.0
maximum: 120.0
title: Diameter
type: number
hub_radius:
description: Hub radius as a fraction of the tip radius (0..1)
maximum: 1.0
minimum: 0.0
title: Hub Radius
type: number
num_blades:
default: 2
description: Blade count
maximum: 16.0
minimum: 1.0
title: Num Blades
type: integer
section_airfoils:
description: Optional per-station Kulfan CST weight pairs [[lower_w, upper_w], ...]. Prefer 'airfoil_layout' — that is what the picker emits.
items:
items:
items:
type: number
type: array
type: array
title: Section Airfoils
type: array
target_mode:
description: Drive to a thrust OR power target
enum:
- thrust
- power
title: Target Mode
type: string
target_value:
description: Thrust (gf) or power (W) target — unit swaps with target_mode
exclusiveMinimum: 0.0
title: Target Value
type: number
required:
- diameter
- hub_radius
- design_rpm
- target_mode
- target_value
title: DesignRequest
type: object
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
title: Location
type: array
msg:
title: Message
type: string
type:
title: Error Type
type: string
required:
- loc
- msg
- type
title: ValidationError
type: object
AirfoilBreakpoint:
additionalProperties: false
description: 'One per-station airfoil assignment in an ``airfoil_layout``.
``r_over_R`` is the normalized radial station the breakpoint applies at;
``airfoil_ref`` is either an aerosandbox library name (e.g. ``"clarky"``) or
an ``afl_<ksuid>`` reference to the caller''s custom airfoil. Custom refs are
resolved caller-scoped at the route and the resolved Kulfan
weights are passed inline to the stateless service.'
properties:
airfoil_ref:
maxLength: 128
minLength: 1
title: Airfoil Ref
type: string
r_over_R:
maximum: 1.0
minimum: 0.0
title: R Over R
type: number
required:
- r_over_R
- airfoil_ref
title: AirfoilBreakpoint
type: object
AnalyzeGeometryRequest:
additionalProperties: false
description: 'Aero-only operating-point analysis request (point / sweep / solve-to-target).
Mirrors ``CalibrateRequest``''s geometry block + ``extra="forbid"`` so an
unknown field (e.g. a stray ``motor_id``) is rejected at the boundary — the
schema itself is the aero-only guard. Every scalar carries numeric
bounds and the sweep ``j_steps`` is capped at 200.'
properties:
air_density:
default: 1.225
description: Air density kg/m^3
exclusiveMinimum: 0.0
maximum: 5.0
title: Air Density
type: number
airfoil:
default: naca4412
maxLength: 64
title: Airfoil
type: string
airspeed:
default: 0.0
description: Freestream m/s
maximum: 343.0
minimum: 0.0
title: Airspeed
type: number
chord:
items:
type: number
maxItems: 50
minItems: 2
title: Chord
type: array
diameter:
description: Diameter in inches
exclusiveMinimum: 0.0
maximum: 120.0
title: Diameter
type: number
hub_radius:
anyOf:
- maximum: 1.0
minimum: 0.0
type: number
- type: 'null'
title: Hub Radius
j_from:
anyOf:
- maximum: 10.0
minimum: 0.0
type: number
- type: 'null'
title: J From
j_steps:
anyOf:
- maximum: 200.0
minimum: 2.0
type: integer
- type: 'null'
description: Sweep point count (DoS bound — each step is a full solve)
title: J Steps
j_to:
anyOf:
- maximum: 10.0
minimum: 0.0
type: number
- type: 'null'
title: J To
mode:
default: point
enum:
- point
- sweep
- solve_to_target
title: Mode
type: string
num_blades:
default: 2
maximum: 16.0
minimum: 1.0
title: Num Blades
type: integer
radius:
items:
type: number
maxItems: 50
minItems: 2
title: Radius
type: array
rpm:
default: 5000.0
exclusiveMinimum: 0.0
maximum: 200000.0
title: Rpm
type: number
section_airfoils:
description: 'Per-station Kulfan CST sections: {lower_weights, upper_weights, leading_edge_weight, TE_thickness} per station. The legacy [lower_w, upper_w] pair form is still accepted on read.'
items: {}
title: Section Airfoils
type: array
sweep:
anyOf:
- items:
type: number
maxItems: 50
type: array
- type: 'null'
title: Sweep
target_type:
anyOf:
- enum:
- thrust
- power
type: string
- type: 'null'
title: Target Type
target_value:
anyOf:
- exclusiveMinimum: 0.0
type: number
- type: 'null'
title: Target Value
thickness:
anyOf:
- items:
type: number
maxItems: 50
type: array
- type: 'null'
title: Thickness
twist:
description: Twist in degrees
items:
type: number
maxItems: 50
minItems: 2
title: Twist
type: array
required:
- diameter
- radius
- chord
- twist
title: AnalyzeGeometryRequest
type: object
AnalyzeGeometryResponse:
description: 'Bounded aero-only union response for all three modes.
Every field is optional so a single shape carries a point, a sweep, OR a
non-converged solve (``converged: false`` + ``reason``). NO motor/battery
field anywhere.'
properties:
Cp:
anyOf:
- type: number
- type: 'null'
title: Cp
Cp_raw:
anyOf:
- type: number
- type: 'null'
description: Power coefficient from the raw blade-element solve, before the empirical correction.
title: Cp Raw
Ct:
anyOf:
- type: number
- type: 'null'
title: Ct
Ct_raw:
anyOf:
- type: number
- type: 'null'
description: Thrust coefficient from the raw blade-element solve, before the empirical correction. The `stations` table integrates to this.
title: Ct Raw
J:
anyOf:
- type: number
- type: 'null'
title: J
converged:
anyOf:
- type: boolean
- type: 'null'
title: Converged
efficiency:
anyOf:
- type: number
- type: 'null'
title: Efficiency
envelope_limiting_factor:
anyOf:
- enum:
- advance_ratio
- tip_mach
- pitch_diameter
- thrust_coefficient
- diameter
- blade_count
type: string
- type: 'null'
description: Which dimension takes this solve outside the validation envelope. Absent when `envelope_status` is `validated` or absent.
title: Envelope Limiting Factor
envelope_status:
anyOf:
- enum:
- validated
- partial
- outside
type: string
- type: 'null'
description: Where this solve sits relative to the published validation envelope (17 two-bladed APC Thin-Electric propellers, in diameter, advance ratio J <= 0.95, tip Mach <= 0.43). `validated` = operating point and propeller both inside it. `partial` = outside in one dimension but still carrying most of the validated model — the common case, and not an error. `outside` = far enough out that the answer is the underlying physics model's own prediction. Absent when the envelope could not be established for this solve.
title: Envelope Status
mode:
title: Mode
type: string
object:
default: geometry_analysis
title: Object
type: string
power:
anyOf:
- type: number
- type: 'null'
title: Power
power_raw:
anyOf:
- type: number
- type: 'null'
description: Shaft power in W from the raw blade-element solve.
title: Power Raw
reason:
anyOf:
- type: string
- type: 'null'
title: Reason
rpm:
anyOf:
- type: number
- type: 'null'
title: Rpm
stations:
items:
$ref: '#/components/schemas/AnalyzeStationRow'
title: Stations
type: array
sweep_Cp:
items:
type: number
title: Sweep Cp
type: array
sweep_Ct:
items:
type: number
title: Sweep Ct
type: array
sweep_J:
items:
type: number
title: Sweep J
type: array
sweep_eta:
items:
anyOf:
- type: number
- type: 'null'
title: Sweep Eta
type: array
thrust:
anyOf:
- type: number
- type: 'null'
title: Thrust
thrust_raw:
anyOf:
- type: number
- type: 'null'
description: Thrust in N from the raw blade-element solve. sum(dT_dr * dr) over `stations` equals THIS, not `thrust`.
title: Thrust Raw
torque_raw:
anyOf:
- type: number
- type: 'null'
description: Torque in N·m from the raw blade-element solve. sum(dQ_dr * dr) over `stations` equals THIS.
title: Torque Raw
required:
- mode
title: AnalyzeGeometryResponse
type: object
CalibrateAcceptedResponse:
description: 202 body — the calibration job was queued.
properties:
id:
title: Id
type: string
object:
default: calibration_job
title: Object
type: string
status:
default: queued
title: Status
type: string
required:
- id
title: CalibrateAcceptedResponse
type: object
ExportGeometryRequest:
additionalProperties: false
description: "Export the editor's working geometry (or a saved prop) to CAD bytes.\n\nExactly ONE of (``section_coords`` inline | ``component_id`` saved-prop) is\nrequired (mutually exclusive — the ``@model_validator``). The inline path is\nthe primary one: the editor always holds ``section_coords`` from\n``/v1/geometry/generate``, so the route skips the DB entirely. The\n``component_id`` path re-runs the deterministic geometry generator\nfrom the saved ``spec_json`` (caller-scoped, IDOR-safe at the route).\n\nStrictness (the geometry house style):\n\n* ``extra=\"forbid\"`` — a stray field (e.g. a motor_id) is rejected.\n* every numeric field carries a bound; the geometry arrays are capped at 200\n stations and ``num_blades`` at ``MAX_NUM_BLADES`` (16) — the DoS guard, enforced BEFORE any loft.\n* when ``section_coords`` is present, every station must share the same point\n count (a well-posed loft requires it) — the ``@model_validator``."
properties:
chord:
anyOf:
- items:
type: number
maxItems: 200
minItems: 2
type: array
- type: 'null'
title: Chord
component_id:
anyOf:
- maxLength: 64
type: string
- type: 'null'
title: Component Id
diameter:
anyOf:
- exclusiveMinimum: 0.0
maximum: 120.0
type: number
- type: 'null'
description: Diameter in inches
title: Diameter
format:
default: step
enum:
- step
- iges
- stl
title: Format
type: string
hub_radius:
anyOf:
- maximum: 1.0
minimum: 0.0
type: number
- type: 'null'
title: Hub Radius
include_hub:
anyOf:
- type: boolean
- type: 'null'
deprecated: true
description: 'Deprecated no-op: the hub and hub-to-root transition are always included in the exported body.'
title: Include Hub
name:
anyOf:
- maxLength: 120
type: string
- type: 'null'
title: Name
num_blades:
default: 2
maximum: 16.0
minimum: 1.0
title: Num Blades
type: integer
radius:
anyOf:
- items:
type: number
maxItems: 200
minItems: 2
type: array
- type: 'null'
description: Absolute radii in meters
title: Radius
rotation:
anyOf:
- enum:
- cw
- ccw
type: string
- type: 'null'
title: Rotation
section_coords:
anyOf:
- items: {}
maxItems: 200
type: array
- type: 'null'
title: Section Coords
sweep:
anyOf:
- items:
type: number
maxItems: 200
type: array
- type: 'null'
title: Sweep
twist:
anyOf:
- items:
type: number
maxItems: 200
minItems: 2
type: array
- type: 'null'
description: Twist in degrees
title: Twist
title: ExportGeometryRequest
type: object
AnalyzeStationRow:
description: One radial-station row of the per-station table. Aero quantities only.
properties:
Cd:
title: Cd
type: number
Cl:
title: Cl
type: number
Mach:
title: Mach
type: number
Re:
title: Re
type: number
beta_deg:
title: Beta Deg
type: number
chord:
title: Chord
type: number
dQ_dr:
title: Dq Dr
type: number
dT_dr:
title: Dt Dr
type: number
eta_local:
title: Eta Local
type: number
r_over_R:
title: R Over R
type: number
va:
title: Va
type: number
vt:
title: Vt
type: number
required:
- r_over_R
- chord
- beta_deg
- Cl
- Cd
- Re
- Mach
- dT_dr
- dQ_dr
- va
- vt
- eta_local
title: AnalyzeStationRow
type: object
GeometryResponse:
properties:
chord:
items:
type: number
title: Chord
type: array
hub_radius:
title: Hub Radius
type: number
object:
default: geometry
title: Object
type: string
radius:
items:
type: number
title: Radius
type: array
section_airfoils:
items: {}
title: Section Airfoils
type: array
section_coords:
anyOf:
- items: {}
type: array
- type: 'null'
title: Section Coords
thickness:
items:
type: number
title: Thickness
type: array
twist:
items:
type: number
title: Twist
type: array
x_le_over_R:
anyOf:
- items: {}
type: array
- type: 'null'
title: X Le Over R
required:
- radius
- chord
- twist
- thickness
- hub_radius
- section_airfoils
title: GeometryResponse
type: object
GenerateGeometryRequest:
additionalProperties: false
properties:
airfoil:
default: naca4412
title: Airfoil
type: string
airfoil_layout:
anyOf:
- items:
$ref: '#/components/schemas/AirfoilBreakpoint'
maxItems: 64
type: array
- type: 'null'
title: Airfoil Layout
chord_spline:
$ref: '#/components/schemas/SplineData'
chord_stations:
anyOf:
- items:
type: number
maxItems: 50
type: array
- type: 'null'
description: Chord per station, normalized c/R.
title: Chord Stations
diameter:
description: Diameter in inches
exclusiveMinimum: 0.0
title: Diameter
type: number
hub_r_over_R:
anyOf:
- exclusiveMaximum: 1.0
exclusiveMinimum: 0.0
type: number
- type: 'null'
description: The blade's own hub as a fraction of tip radius. Absent => the legacy APC diameter regression.
title: Hub R Over R
num_blades:
default: 2
maximum: 16.0
minimum: 1.0
title: Num Blades
type: integer
pitch:
description: Pitch in inches
exclusiveMinimum: 0.0
title: Pitch
type: number
station_r_over_R:
anyOf:
- items:
type: number
maxItems: 50
type: array
- type: 'null'
description: Station r/R column — strictly increasing within (0, 1]. Its presence switches chord/twist/thickness/sweep from spline evaluation to radius interpolation.
title: Station R Over R
sweep:
anyOf:
- items:
type: number
maxItems: 50
type: array
- type: 'null'
title: Sweep
sweep_stations:
anyOf:
- items:
type: number
maxItems: 50
type: array
- type: 'null'
description: Swept c/4 leading-edge locus per station, x_le/R.
title: Sweep Stations
thickness_scale:
default: 1.0
maximum: 3.0
minimum: 0.1
title: Thickness Scale
type: number
thickness_spline:
$ref: '#/components/schemas/SplineData'
thickness_stations:
anyOf:
- items:
type: number
maxItems: 50
type: array
- type: 'null'
description: Thickness per station, t/c.
title: Thickness Stations
twist_spline:
anyOf:
- $ref: '#/components/schemas/SplineData'
- type: 'null'
twist_stations:
anyOf:
- items:
type: number
maxItems: 50
type: array
- type: 'null'
description: Twist per station, degrees.
title: Twist Stations
required:
- diameter
- pitch
- chord_spline
- thickness_spline
title: GenerateGeometryRequest
type: object
securitySchemes:
HTTPBearer:
scheme: bearer
type: http