{"openapi":"3.1.0","info":{"title":"Friendli (BYOK) API","version":"0.1.0","description":"Friendli (BYOK) lets an AI assistant read your own Friendli data through the Friendli API with a key you supply (Friendli personal access token (starts with flp_)). Read-only: 9 tools (list_serverless_models, list_dedicated_endpoints, get_dedicated_endpoint, get_dedicated_endpoint_status, get_team_cost, get_team_usage, list_datasets, get_dataset, get_file). The BYOK key travels with each request,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-friendli.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-friendli/docs"},"termsOfService":"https://connectorbay.com/byok-friendli/terms"},"servers":[{"url":"https://byok-friendli.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-friendli/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_serverless_models":{"post":{"operationId":"list_serverless_models","summary":"List Model APIs (serverless) with context length, per-token pricing, modalities and tool-calling support. Use for \"Which","description":"List Model APIs (serverless) with context length, per-token pricing, modalities and tool-calling support. Use for \"Which Friendli serverless models support tool calls and what do they cost\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_serverless_modelsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_dedicated_endpoints":{"post":{"operationId":"list_dedicated_endpoints","summary":"List dedicated endpoint deployments as a map from endpoint id to status (RUNNING, SLEEPING, FAILED and so on), optionall","description":"List dedicated endpoint deployments as a map from endpoint id to status (RUNNING, SLEEPING, FAILED and so on), optionally for one project. Use for \"Which of my Friendli dedicated endpoints are running\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only endpoints of this project; omit to list all endpoints of the team.","title":"Project Id"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many items to return (1 to 100).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"The nextCursor from the previous answer, to get the next page.","title":"Cursor"}},"title":"list_dedicated_endpointsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_dedicated_endpoint":{"post":{"operationId":"get_dedicated_endpoint","summary":"Get the specification of one dedicated endpoint: GPU type and count, autoscaling bounds, batch size and replica counts. ","description":"Get the specification of one dedicated endpoint: GPU type and count, autoscaling bounds, batch size and replica counts. Use for \"How many GPUs and replicas does my Friendli endpoint ep_123 use\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"endpoint_id":{"description":"Endpoint id from list_dedicated_endpoints.","maxLength":200,"title":"Endpoint Id","type":"string"}},"required":["endpoint_id"],"title":"get_dedicated_endpointArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_dedicated_endpoint_status":{"post":{"operationId":"get_dedicated_endpoint_status","summary":"Get the current status of one dedicated endpoint, its error code if failed, and its deployment phase. Use for \"Is my Fri","description":"Get the current status of one dedicated endpoint, its error code if failed, and its deployment phase. Use for \"Is my Friendli endpoint ep_123 healthy\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"endpoint_id":{"description":"Endpoint id from list_dedicated_endpoints.","maxLength":200,"title":"Endpoint Id","type":"string"}},"required":["endpoint_id"],"title":"get_dedicated_endpoint_statusArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_team_cost":{"post":{"operationId":"get_team_cost","summary":"Get the team's daily cost buckets between two midnight-UTC timestamps, optionally grouped by line item. Use for \"What di","description":"Get the team's daily cost buckets between two midnight-UTC timestamps, optionally grouped by line item. Use for \"What did Friendli cost my team per day last week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start_time":{"description":"RFC 3339 UTC time with zeroed time-of-day, for example 2026-10-01T00:00:00Z; at most one year back.","maxLength":200,"title":"Start Time","type":"string"},"end_time":{"description":"RFC 3339 UTC time with zeroed time-of-day, for example 2026-10-08T00:00:00Z.","maxLength":200,"title":"End Time","type":"string"},"limit":{"anyOf":[{"maximum":35,"minimum":1,"type":"integer"},{"type":"null"}],"default":7,"description":"How many daily buckets to return (1 to 35).","title":"Limit"},"group_by":{"anyOf":[{"const":"line_item","type":"string"},{"type":"null"}],"default":null,"description":"Group costs by line_item.","title":"Group By"},"page":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"The next_page cursor from the previous answer, to get the next page.","title":"Page"}},"required":["start_time","end_time"],"title":"get_team_costArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_team_usage":{"post":{"operationId":"get_team_usage","summary":"Get the team's usage (requests, tokens, GPU usage) in time buckets of 1d, 1h or 5m, optionally grouped by model, product","description":"Get the team's usage (requests, tokens, GPU usage) in time buckets of 1d, 1h or 5m, optionally grouped by model, product type or user. Use for \"How many tokens did my Friendli team use per model yesterday\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start_time":{"description":"RFC 3339 UTC time on a 5-minute boundary, for example 2026-10-16T00:00:00Z; at most one year back.","maxLength":200,"title":"Start Time","type":"string"},"end_time":{"description":"RFC 3339 UTC time on a 5-minute boundary, later than start_time.","maxLength":200,"title":"End Time","type":"string"},"bucket_width":{"anyOf":[{"enum":["1d","1h","5m"],"type":"string"},{"type":"null"}],"default":"1d","description":"Bucket size: 1d, 1h or 5m.","title":"Bucket Width"},"limit":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Number of buckets to return (daily max 31; see the docs for hourly and 5-minute limits).","title":"Limit"},"group_by":{"anyOf":[{"enum":["model","product_type","user_id"],"type":"string"},{"type":"null"}],"default":null,"description":"Group usage by one field: model, product_type or user_id.","title":"Group By"},"page":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"The next_page cursor from the previous answer, to get the next page.","title":"Page"}},"required":["start_time","end_time"],"title":"get_team_usageArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_datasets":{"post":{"operationId":"list_datasets","summary":"List datasets of a project with modality and timestamps; supports name search and cursor paging. Use for \"What datasets ","description":"List datasets of a project with modality and timestamps; supports name search and cursor paging. Use for \"What datasets do I have in Friendli project proj_123\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project_id":{"description":"Project id whose datasets to list.","maxLength":200,"title":"Project Id","type":"string"},"name_search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only datasets whose name matches this text.","title":"Name Search"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"asc or desc.","title":"Direction"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many items to return (1 to 100).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"The nextCursor from the previous answer, to get the next page.","title":"Cursor"}},"required":["project_id"],"title":"list_datasetsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_dataset":{"post":{"operationId":"get_dataset","summary":"Get one dataset's name, timestamps and input/output modalities. Use for \"Describe Friendli dataset ds_123\".","description":"Get one dataset's name, timestamps and input/output modalities. Use for \"Describe Friendli dataset ds_123\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"dataset_id":{"description":"Dataset id from list_datasets.","maxLength":200,"title":"Dataset Id","type":"string"}},"required":["dataset_id"],"title":"get_datasetArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_file":{"post":{"operationId":"get_file","summary":"Get metadata of one uploaded file: name, size, status and expiry (not its content). Use for \"Has Friendli file file_123 ","description":"Get metadata of one uploaded file: name, size, status and expiry (not its content). Use for \"Has Friendli file file_123 finished uploading\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"file_id":{"description":"File id.","maxLength":200,"title":"File Id","type":"string"}},"required":["file_id"],"title":"get_fileArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}