ask_model
ChatGPTSend a one-shot prompt to any OceanToken chat model and get its answer: delegate a sub-task to a cheaper or specialised model, get a second opinion from a different lab, or use a model with abilities you lack (long context, web search, vision via image_urls). Billed per token; the answer includes usage and cost.
create_3d_model
ChatGPTStart a 3D model generation job: from a text prompt, from one image (image_url), or from 2-4 views of one object (image_urls, in the order front, left, back, right). Returns a job_id immediately; poll get_job until completed (typically 1-3 minutes). The result is a glb file link valid about 24 hours. Billed per model; estimate_cost first and tell the user the price, and pass max_cost_usd to refuse anything over the agreed budget. Images must be public URLs or data: URLs (use upload_file for local files).
create_video
ChatGPTStart a video generation job (text-to-video, first-frame image-to-video, first+last frame, or reference media, depending on the model; see get_model). Returns a job_id immediately; poll get_job until completed (typically 1-5 minutes). A prepaid hold is placed at start and the actual cost is charged on completion (nothing if it fails). Always estimate_cost first and tell the user the price; pass max_cost_usd to refuse anything over the agreed budget. Image/video/audio inputs must be public URLs or data: URLs (use upload_file for local files).
estimate_cost
ChatGPTEstimate what a request will cost before running it, in USD, with a confidence level and the assumptions made, and whether it fits the account's available balance. Pass the fields that apply: chat/embedding: input_tokens or input_text, output_tokens; image: images, size, quality; video: seconds, resolution, generate_audio, with_image_input, with_video_input; speech: text or characters; transcription: audio_seconds. Use before video, image batches and long speech, and tell the user.
generate_image
ChatGPTGenerate images with any OceanToken image model (text-to-image, or image-to-image / editing when reference_image_urls are given). Returns download links (valid ~24h) and small previews. size takes '1024x1024'-style sizes or ratios like '16:9' (see get_model for what a model accepts); quality takes low/medium/high or 1K/2K/4K. Spends balance: estimate first for batches or expensive models, and pass max_cost_usd when the user set a budget. If the model takes longer than wait_seconds, returns a job_id to poll with get_job.
generate_speech
ChatGPTText-to-speech with an OceanToken speech model (voice-overs, narration). Returns an audio download link (valid ~24h). Voice names are model-specific: leave voice empty to use the model's verified default, or pick one from get_model's 'voices'. Models with a verified default voice include deepgram/aura-2, google/gemini-3.1-flash-tts-preview, hexgrad/kokoro-82m, x-ai/grok-voice-tts-1.0, microsoft/mai-voice-2 and fish-audio/*. Models that support it take tone and pacing notes in the instructions field. Billed per character.
get_account
ChatGPTThe connected OceanToken account: email, prepaid balance, available balance (minus holds for running video jobs), total spent, and what this connection has spent.
get_job
ChatGPTStatus of a video job (from create_video) or a long-running image job (from generate_image). Waits up to wait_seconds for it to finish. When completed, returns download links valid about 24 hours: download them into the project if the user wants to keep them.
get_model
ChatGPTFull details for one model: pricing, limits, capabilities and, for image and video models, the parameters it accepts (sizes/aspect ratios/resolutions/qualities, durations, audio, first/last-frame and reference-media support). Call this before using non-default options.
search_models
ChatGPTSearch OceanToken's catalog of 500+ models. Returns id, type, publisher, price in the unit the model is billed in, context window and capabilities. Use it before any generation to pick a model; never guess model ids. Filters: type (chat, image, video, speech, transcription, embedding, rerank), publisher (e.g. openai, anthropic, google, bytedance), capabilities (vision, tools, reasoning, web_search, audio_output), max_price in the type's main unit (chat: USD per 1M output tokens; image: per image; video: per second; speech: per 1K characters; transcription: per minute). sort='price' lists cheapest first. 'featured' models are OceanToken's directly served picks.
transcribe_audio
ChatGPTSpeech-to-text with any OceanToken transcription model. Takes a public https URL or data: URL of an audio/video file (up to 20 MB; use upload_file for local files). response_format 'verbose_json' adds timestamped segments where the model supports it; 'srt'/'vtt' return subtitles.
upload_file
ChatGPTMake a local file usable as a model input (reference image, first frame, audio to transcribe). Either pass content_base64 (files up to 10 MB), or omit it to get a one-time upload_url and a curl command to run locally (best for large files); both give a read_url (valid ~24h) to pass to other tools.