GET /v1/models
Model IDs available to this key.
curl "https://api.tokentpilot.com/v1/models" \
-H "Authorization: Bearer $TOKENPILOT_API_KEY"Account permissions and active channels determine which models and protocols you can use. Check the model list and pricing first.
GET /v1/modelsPOST /v1/chat/completionsPOST /v1/responsesPOST /v1/messagesPOST /v1beta/models/{model}:generateContentPOST /v1/embeddingsPOST /v1/images/generationsPOST /v1/videosGET /v1/videos/{id}GET /v1/modelsModel IDs available to this key.
curl "https://api.tokentpilot.com/v1/models" \
-H "Authorization: Bearer $TOKENPILOT_API_KEY"POST /v1/chat/completionsSend a chat request. Add "stream": true and use curl -N to receive server-sent events.
curl "https://api.tokentpilot.com/v1/chat/completions" \
-H "Authorization: Bearer $TOKENPILOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"REPLACE_WITH_MODEL_ID","messages":[{"role":"user","content":"Reply in one sentence."}]}'POST /v1/responsesUse the Responses format with a model that supports it.
curl "https://api.tokentpilot.com/v1/responses" \
-H "Authorization: Bearer $TOKENPILOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"REPLACE_WITH_MODEL_ID","input":"Summarize this request in one sentence."}'POST /v1/messagesAnthropic Messages format. Provide x-api-key and the protocol version.
curl "https://api.tokentpilot.com/v1/messages" \
-H "x-api-key: $TOKENPILOT_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model":"REPLACE_WITH_MODEL_ID","max_tokens":256,"messages":[{"role":"user","content":"Write a short greeting."}]}'POST /v1beta/models/{model}:generateContentGemini native request. Insert the model ID in the URL path.
curl "https://api.tokentpilot.com/v1beta/models/REPLACE_WITH_MODEL_ID:generateContent" \
-H "x-goog-api-key: $TOKENPILOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"contents":[{"parts":[{"text":"Write a short greeting."}]}]}'POST /v1/embeddingsConvert text to vectors with an embedding model.
curl "https://api.tokentpilot.com/v1/embeddings" \
-H "Authorization: Bearer $TOKENPILOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"REPLACE_WITH_MODEL_ID","input":["API integration notes"]}'POST /v1/images/generationsGenerate an image. For edits, use POST /v1/images/edits and the input format required by the selected model.
curl "https://api.tokentpilot.com/v1/images/generations" \
-H "Authorization: Bearer $TOKENPILOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"REPLACE_WITH_MODEL_ID","prompt":"A ceramic cup on a wooden table in morning light."}'POST /v1/videosCreate an asynchronous video job with a compatible model. Save the returned job ID.
curl "https://api.tokentpilot.com/v1/videos" \
-H "Authorization: Bearer $TOKENPILOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"REPLACE_WITH_MODEL_ID","prompt":"A slow camera pan across a quiet harbor."}'GET /v1/videos/{id}Poll job status at reasonable intervals. Once complete, retrieve the content if the selected model supports the content endpoint.
curl "https://api.tokentpilot.com/v1/videos/REPLACE_WITH_JOB_ID" \
-H "Authorization: Bearer $TOKENPILOT_API_KEY"
curl -L --output result.mp4 "https://api.tokentpilot.com/v1/videos/REPLACE_WITH_JOB_ID/content" \
-H "Authorization: Bearer $TOKENPILOT_API_KEY"