탐색으로 건너뛰기

AI Models guides

Pass model output downstream only after the output reaches a defined ready state. A support classification is ready when the fields from choices[0].message.content pass schema validation. A product image is ready when the task from POST /v1/images/tasks reaches succeeded and the image URL opens.

Pass a support classification to your application

Follow the text SDK setup and confirm that your model supports structured output on the chosen protocol. In Chat Completions, specify your application’s structure with response_format. For example, require category and summary, with category limited to Setup, Payment and Other.

Check finish_reason, parse choices[0].message.content and validate the parsed object against the same schema. A record with category Setup and a non-empty summary goes to the setup queue. Send records with incomplete fields, truncation or refusals to manual review.

Submit an image task and track it to completion

Send JSON to POST https://api.beatapi.io/v1/images/tasks with BeatAPI Bearer authentication:

{"model":"nano-banana","prompt":"A plain product photo of a reusable bottle on a light gray tabletop.","aspect_ratio":"1:1","output_format":"png"}

Generate an Idempotency-Key for the image request before sending the request. Save the returned data.id, and schedule GET /v1/tasks/{task_id} with data.poll_after_seconds. On succeeded, take the image URL from data.output.media, check that the image opens, and save the task ID on the asset record. If the connection drops during submission, see idempotent image retries.

AI model FAQ · BeatAPI pricing