Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions specs/curl/inspect_giky_api_model_rates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Inspect Giky API model rates with curl and jq
command: |-
(
set -o pipefail
printf 'Enter a Giky API model slug: ' >&2
IFS= read -r giky_slug
case "$giky_slug" in
''|*[!a-zA-Z0-9._-]*) printf 'Enter a valid model slug.\n' >&2; exit 2 ;;
esac
curl --fail --silent --show-error --max-time 12 \
--header 'Accept: application/json' \
'https://gikyapi.com/api/catalog' |
jq --exit-status --arg slug "$giky_slug" '
.currency as $currency |
[.models[] | select(.slug == $slug)] |
if length == 1 then .[0]
else error("Expected a single matching model in the public catalog")
end |
{model: .slug, kind, currency: $currency, generationAvailable,
priceRows: [(.prices // [])[] | {operation, amount, unit, resolution, duration, when}]}
'
)
tags:
- curl
- api
description: Inspect operation, resolution, duration, amount and unit for a Giky API model before quoting an image or video workflow. Requires curl and jq. Reads the public catalog without credentials or media generation.
source_url: https://gikyapi.com/docs/
author: shisan12323
author_url: https://github.com/shisan12323
shells:
- bash
- zsh