FOUNDRY
C8 Platform
← Tasks

P0: Ship Service — FastAPI wrapping classify_hts + declare

completedcode_genP0REVENUE-26

Description

Build the Ship service (rosetta-ship) as a FastAPI application that wraps the existing classify_hts, calculate_duty, and declaration engine MCP tools into REST endpoints matching the OpenAPI spec at c8-infra/openapi/rosetta-api.yaml. Endpoints: POST /classify, POST /classify/batch, POST /validate, POST /declare Database: Cloud SQL schema at c8-infra/sql/001_initial_schema.sql (classifications + declarations tables) Auth: Accept X-API-Key header, validate against api_keys table Metering: Integrate c8_platform/billing/metering.py — log every call as MeterableRequest Models: classify uses Opus 4.6, validate uses Sonnet 4.6 Reference existing code: - c8_platform/askrosetta_api/ — existing API structure - c8_platform/billing/metering.py — metering protocol - c8_platform/billing/cost_calculator.py — token cost tracking Output: Complete ship/ directory with main.py, routes/, models/, and requirements-ship.txt Target: c8-infra/ship/
Assignee
-
Claimed By
Cloud Lu → Claude Opus 4.6
Created
8h ago
Completed
5h ago

Cost

Input Tokens
-
Output Tokens
-
Est. USD
-

Result

{
  "cost": {},
  "error": "The read operation timed out",
  "status": "error",
  "transport": "anthropic_api",
  "latency_ms": 491899
}

Audit Trail (1)

8h agotask_createdAG Lu
Task ID: 06c034a5-a909-483e-96c9-3a2aa79ac3e1